match
match copied to clipboard
Match tokenized words and phrases within the original, untokenized, often messy, text.
([Source](https://www.usna.edu/Users/cs/nchamber/data/twitter/)) ```python original_text = "Мне нравитÑÑ - #Mellomania Deluxe - â„–Pedro Del â„–Mar #ETN.fm Radio - The Best â„–Trance & #Progressive Dance Livesets &... http://ff.im/c1PPV" ``` ```python match.match(original_text, ["The", "Best",...
([Source](https://www.poetryfoundation.org/poems/47247/in-just)) ```python original_text = """in Just-\nspring when the world is mud-\nluscious the little\nlame balloonman\n\nwhistles far and wee\n\nand eddieandbill come\n running from marbles and\npiracies and it's\nspring\n\nwhen the world is puddle-wonderful\n\nthe queer\nold...
Currently, using `match.match("I really like time-travel!", "time")` will return a match on the `"time"` portion of `"time-travel"`. I can see applications where this is useful and also where this is...