UTMediaCAT / Voyage

Other
12 stars 5 forks source link

keyword matched when that word is a sub-string of another word #41

Closed wangx173 closed 8 years ago

wangx173 commented 8 years ago

Example: if the keyword is "ISIS",

crisis, Datanálisis will be considered as match

yuya-iwabuchi commented 8 years ago

I cannot find a single url from your server that I can recreate the problem.
Are you running on the latest commit?

wangx173 commented 8 years ago

http://159.203.7.224/admin/articles/article/326/

check it out

yuya-iwabuchi commented 8 years ago

As I said, I cannot find a single url from your server that I can recreate the problem.

>>> c = ExplorerArticle("http://www.bbc.com/mundo/noticias/2015/12/151127_america_latina_albinos_puerto_rico_aislamiento_nieves_amv")
>>> c.download()
True
>>> c.preliminary_parse()
True
>>> regex = re.compile('[^a-z]' + 'isis' + '[^a-z]', re.IGNORECASE)
>>> regex.search(c.text)
>>> regex.search(c.title)
>>>
wangx173 commented 8 years ago

that's weird, cuz I am running it on master with the most recent commit, can you try it on another server?

yuya-iwabuchi commented 8 years ago

Nevermind, fixed the issue at 543989c73212bfb44b0af871b93d67f2dcd6781b