Commit Graph

4 Commits

Author SHA1 Message Date
Zorchenhimer 4298ee1e67
Fix parseNounOptions()
Set the proper variables for the "compound" and "simple" noun options.
2021-02-21 20:00:59 -05:00
Zorchenhimer 553b89cfe0
Implement consumeNewWord()
Implement the consumeNewWord() method that will handle new words defined
in format strings enclosed in double curly braces.  The format is as
follows:

    {{word_type:word:options,list}}

The notable difference between this and the other definitions is that
only verbs and nouns are allowed to be defined this way.  Additionally
only regular verbs and nouns are allowed (the "irregular" option is
ignored).

A new sentence has been added that utilizes this new function.

Lastly, some of the option parsing code for verbs and nouns has
been separated into their own functions so it can be reused between both
consumeWord() and consumeNewWord().
2021-02-20 21:35:26 -05:00
Zorchenhimer 94a46a7072
Start implementing format sentences
Base word types are implemented.  The format for defining a word is as follows:

    {word_type:optionA,optionB}

Where `word_type` is one of the following:

    - adjective
    - noun
    - noun_phrase
    - pronoun
    - verb

Followed by a colon and a comma separated list of options for that word.
Options are as follows (adjectives have no options):

Nouns:
    - compound
    - plural

Noun Phrase:
    - indefinite
    - noadj
    - plural
    - compound

Pronouns:
    - plural

Verbs:
    - conjugation type: i (default), you, it, we, or they
    - conjugation time: past, present (default), or future
    - invert (not implemented yet)

Options for a word type are optional and may be omitted.
2021-02-17 18:07:23 -05:00
Zorchenhimer c376180b27
Rename generic.go to english.go
Grammar is probably different for different languages [citation needed].
2021-02-17 09:17:04 -05:00