meyersbs / uncertainty

A Python implementation of the uncertainty classifier, based on the work of Veronika Vincze.
MIT License
16 stars 4 forks source link

Give a working example when pypi package is used #4

Closed DavidMinarsch closed 6 years ago

DavidMinarsch commented 6 years ago

from uncertainty.classifier import Classifier

cls = Classifier() cls.predict("I wonder if I am the walrus.")

['C', 'C', 'N', 'C', 'C', 'C', 'C', 'C']

cls = Classifier(binary=True) cls.predict("I wonder if I am the walrus.")

['C', 'C', 'U', 'C', 'C', 'C', 'C', 'C']

cls = Classifier (granularity='sentence') cls.predict("I wonder if I am the walrus.")

N

cls = Classifier (granularity='sentence', binary=True) cls.predict("I wonder if I am the walrus.")

U

meyersbs commented 6 years ago

Thank you very much for your suggestion. I've updated the Installation & Usage page on the Wiki.