-
-
Save bigimot/226ccff91fadafee1652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loose_match = ["bot", "software"] | |
exact_match = ["auto"] | |
ignore_negative = ["no"] | |
text = "no auto software, no bot. the best way to find auto bots." | |
# Would like to ignore negative context, so scan for 'bot' & 'software' will return | |
# 'software', 'bot' from the 1st line, and 'bot' from the second line. | |
# Then check if ignore_negative words appear in the same sentance, and ignore if they are. | |
# so checking first line (caught 'software' and 'bot'), "no" appears, and both words should be ignored. | |
# checking second line (caught 'bot' and 'auto'), no ignore_negative words appear, and should catch this word. | |
# so final result of the scan will be 'bot'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment