got.asts package¶
Submodules¶
got.asts.ast module¶
-
got.asts.ast.AST¶ alias of
got.asts.ast.EASA
-
class
got.asts.ast.EASA(strings_collection)[source]¶ Bases:
got.asts.base.AST-
score(query, normalized=True, synonimizer=None, return_suffix_scores=False)[source]¶ Computes the matching score for the given string against the AST.
-
traverse_breadth_first(callback)[source]¶ Visits the internal “nodes” of the enhanced suffix array in breadth-first order.
-
got.asts.base module¶
-
class
got.asts.base.AST(strings_collection)[source]¶ Bases:
abc.ABC-
score(query, normalized=True, synonimizer=None, return_suffix_scores=False)[source]¶ Computes the matching score for the given string against the AST.
-
traverse_breadth_first(callback)[source]¶ Traverses the annotated suffix tree in breadth-first order.
-
got.asts.consts module¶
got.asts.exceptions module¶
-
exception
got.asts.exceptions.EastException(message=None, **kwargs)[source]¶ Bases:
Exception-
msg_fmt= 'An unknown exception occurred.'¶
-
-
exception
got.asts.exceptions.EmptyStringsCollectionException(message=None, **kwargs)[source]¶ Bases:
got.asts.exceptions.EastException-
msg_fmt= 'The input strings collection is empty.'¶
-
-
exception
got.asts.exceptions.NoSuchASTAlgorithm(message=None, **kwargs)[source]¶ Bases:
got.asts.exceptions.NotFoundException-
msg_fmt= 'There is no AST construction algorithm with name `%(name)s`.'¶
-
-
exception
got.asts.exceptions.NotFoundException(message=None, **kwargs)[source]¶ Bases:
got.asts.exceptions.EastException-
msg_fmt= 'Not found.'¶
-
got.asts.utils module¶
-
got.asts.utils.make_unique_endings(strings_collection)[source]¶ Make each string in the collection end with a unique character. Essential for correct builiding of a generalized annotated suffix tree. Returns the updated strings collection, encoded in Unicode.
max strings_collection ~ 1.100.000