Commit 207ddf1e authored by Pokiros's avatar Pokiros
Browse files

Change module architecture (move ner, tagger in a nlp module) +add test +add...

Change module architecture (move ner, tagger in a nlp module) +add test +add requirement for install+ couple of changes
parent 2ea42db4
No related merge requests found
Showing with 44 additions and 0 deletions
+44 -0
# coding = utf-8
from termcolor import colored
class NotADisambiguatorInstance(Exception):
def __init__(self):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__(colored("Setting disambiguator: Give a Disambiguator or Disambiguator sub-class instance","red"))
# coding = utf-8
from termcolor import colored
class LanguageNotAvailable(Exception):
def __init__(self, lang, object):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__("{0} not available for {1}".format(colored(lang,"red"), colored(object.__class__.__name__,"magenta")))
#coding = utf-8
from termcolor import colored
class ClassifierNotFound(Exception):
def __init__(self, file):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__("Classifier at {0} doesn't exists. Check your configuration file !".format(colored(file,"red")))
class BinairyDirectoryNotFound(Exception):
def __init__(self, dir,object):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__("Binairies for {0} at {1} doesn't exists. Check your configuration file !".format(colored(object.__class__.__name__,"magenta"),colored(dir,"red")))
class NotANERInstance(Exception):
def __init__(self):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__(colored("Setting Named Entity Recognizer: Give a NER or NER sub-class instance","red"))
# coding = utf-8
from termcolor import colored
class NotATaggerInstance(Exception):
def __init__(self):
# Call the base class constructor with the parameters it needs
super(Exception, self).__init__(colored("Setting pos-tagger: Give a Tagger or Tagger sub-class instance","red"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment