manipulate a string in django to show past/future tense
I'm looking for a way to manipulate a string depending if it's in the past or the future, so I want to:
Test to see if it's now or in the future add an "s" to the string Test to see if it's in the past add a "d" to the string
I know this开发者_开发知识库 has come up before, but didn't find it in a search.
Thanks!
Wendy
I don't know if there's something within django that does this, but you can categorize the tense of a word using NLTK. For examples, see the parts of speech tagger in chapter 5 of the NLTK book (free online).
精彩评论