def __init__(self, path="<STR_LIT>", classifier=None, known=set(), unknown=set()):
try:<EOL><INDENT>from pattern.vector import Classifier<EOL>from pattern.vector import Perceptron<EOL><DEDENT>except ImportError:<EOL><INDENT>sys.path.insert(<NUM_LIT:0>, os.path.join(MODULE, "<STR_LIT:..>"))<EOL>from vector import Classifier<EOL>from vector import Perceptron<EOL><DEDENT>self._path  = path<EOL>self._classifier = Classifier.load(path) if path else classifier or Perceptron()<EOL>self.unknown = unknown | self._classifier._data.get("<STR_LIT>", set())<EOL>self.known = known<EOL>
A language model using a classifier (e.g., SLP, SVM) trained on morphology and context.