开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜