I have a string S and a list of strings allItems, allItems contains strings that may have common “sub-words” but one element is never an extension of another: My goal is to find every match or approximate match of a string in allItems in S alongside their index(can be start or end, or ideally both). I’ve been searching for some
Tag: full-text-search
Seach txt File for a keyword like [word & random number]
I have this code: I want to search Text.txt for a keyword that contains a random number, that looks like this: Keyword = [Word & random Number] or [ABC-1] / [ABC-1234] The “Word” part is always the same but the number is up to 4 decimals (1-9999). When the keyword is found, i want to highlight it like this: ABC-1
Python – Fast count words in text from list of strings and that start with
I know that similar questions have been asked several times, but my problem is a bit different and I am looking for a time-efficient solution, in Python. I have a set of words, some of them end with the “*” and some others don’t: I have to count their total occurrences in a text, considering that anything can go after