pelinker.matching¶
match_pattern(pattern, text, suffix_length=1, buffer_length=10)
¶
given the pattern, split it into words, match ordered groups of words truncating each of at size n-1
if its size > 5. Allow for pieces of text, spaces and dashes in between of size at most 10.
:param pattern:
:param text:
:param suffix_length: remove word ending induces -> induce
:param buffer_length: allow for words (and dashes) in between
:return:
Source code in pelinker/matching.py
match_pieces(pattern, text, suffix_length=1, matches=None)
¶
given the pattern and the match of constituent words in the sense of match_pattern,
for each match find the boundaries of matching words
:param pattern: :param text: :param suffix_length: :param matches: :return: