clips / pattern

Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.
https://github.com/clips/pattern/wiki
BSD 3-Clause "New" or "Revised" License
8.76k stars 1.58k forks source link

Singularize bug for words such as rookies and beanies #227

Closed intentionally-left-nil closed 4 months ago

intentionally-left-nil commented 6 years ago

All of the words in singular_ie inside of inflect.py aren't being singularized properly.

The code in question is

    for x in singular_ie:
        if w.endswith(x+"s"):
            return w

Instead of returning the singular form (x), it returns the plural one (w).

I will make a PR