Expand description
§English Phrase Structure Rules library
A library containing types for building English sentences with strict rules from the linguistics nerds.
use enpsrlib::*;
// I eat green apples.
let sentence = S::simple(
    NPCP::NP(NP::from_head(N::new("I"))),
    VP::from_head(V::new("eat")).with_noun_phrase(
        NP::from_head(N::new("apples"))
            .with_adjective_phrase(AdjP::from_head(Adj::new("green"))),
    ),
);
println!("{:?}", sentence);Source for now: https://ecampusontario.pressbooks.pub/essentialsoflinguistics2/chapter/a1-1-drawing-phrase-structure-rule-trees/
Structs§
- Adjective
- AdjectivePhrase 
- Adverb
- AdverbialPhrase 
- Auxiliary
- Complementizer
- ComplementizerPhrase 
- Conjunction
- DegreeModifier 
- Determiner
- Negation
- Noun
- NounPhrase 
- Number
- Preposition
- PrepositionalPhrase 
- Sentence
- Verb
- VerbPhrase 
Enums§
Traits§
- PartOfSpeech 
- Phrase
- Word
- Implemented by word types