
These two operations are sufficient for you to maintain tag counts and tag references to text in your application. To force a hyperlink to not be treated in the same manner, pass in the False parameter, such as generate(False,False) or generate(True,False), depending on your Strict mode option. If generate(False) or tag_list(False) is set, then special characters will be url encoded.Īlso by default, generate() will treat hyperlink text (e.g. The result will be a list: īy default, generate() and tag_list() will be in strict mode, which means all special characters will be stripped. You can call it like so: t.text = "This text is tagged kittens"

If no link is set, the default path is /, such as /text.įor the second operation, you will only receive a list of all your taggable words from the text. The result will be: This is the text to display! For instance, if you set your tag routing to a relative path such as /tags/ and want to use the css class named "tagged": from auto_tagify2 import AutoTagify Optional parameters you can set are the paths for tag links and the css classes for link. There are two operations Auto Tagify performs - one returns the selection of text with links embedded in the string and the other returns a list of all the taggable words as the stem word (using lemmatization).įor the first operation, everything is optional, but it is most effective to enter some text. Any text that is less than 3 characters long or matches a particular POS (part-of-speech) will be ignored.

Auto Tagify2 is a simple auto tagging module that uses NLTK to generate tags out of a selection of text.
