Added empty string parser
This commit is contained in:
@@ -28,7 +28,7 @@ class ExactConceptParser(BaseParser):
|
||||
sheerka = context.sheerka
|
||||
words = self.get_words(text)
|
||||
if len(words) > self.MAX_WORDS_SIZE:
|
||||
return ReturnValueConcept(self.name, False, sheerka.new(BuiltinConcepts.CONCEPT_TOO_LONG, obj=text))
|
||||
return sheerka.ret(self.name, False, sheerka.new(BuiltinConcepts.CONCEPT_TOO_LONG, obj=text))
|
||||
|
||||
recognized = False
|
||||
for combination in self.combinations(words):
|
||||
@@ -53,7 +53,7 @@ class ExactConceptParser(BaseParser):
|
||||
return res
|
||||
|
||||
log.debug(f"Failed to recognize {words}")
|
||||
return ReturnValueConcept(self.name, False, sheerka.new(BuiltinConcepts.UNKNOWN_CONCEPT, obj=text))
|
||||
return sheerka.ret(self.name, False, sheerka.new(BuiltinConcepts.UNKNOWN_CONCEPT, obj=text))
|
||||
|
||||
@staticmethod
|
||||
def get_words(text):
|
||||
|
||||
Reference in New Issue
Block a user