How would I program grammar rules?

Started by
14 comments, last by Tutorial Doctor 10 years ago


I can't find the Senses System you mentioned, either

It's here:

http://www.gamedev.net/blog/1796/entry-2259145-programming-the-5-senses-entry/

They call me the Tutorial Doctor.

Advertisement

Nice haegarr! I am getting closer to a solution. Yes, I am going to make it object oriented. Going to make a Grammar Class. Then I could do:


name.singular
name.plural

I could store all the grammar rules in this class. The above example is oversimplified though.

They call me the Tutorial Doctor.

Here is a list of rules for inflections (just found this keyword on google):

http://esl.fis.edu/grammar/rules/inflections.htm

Also I would find some other list for verb tenses.

Wondering if these rules can be mirrored in any programming language that has good string manipulation functions.

They call me the Tutorial Doctor.

I think what you want is some sort of stemming algorithm.

This removes the suffix of a word down to its root word.

One such algorithm is the Porter stemmer. There are lots of examples of Porter stemmer here.

Thanks TheBlendFactor. I am looking at the link to the article on "Lookup tables." When I saw that they are fast and easy and allow for exceptions I was sprung. haha.

You all have given me and anyone else looking to do this a lot of varied and good information to start from. Thanks.

They call me the Tutorial Doctor.

Found a video about Database Lookup Tables.

They call me the Tutorial Doctor.

This topic is closed to new replies.

Advertisement