psolin / cleanco

Company Name Processor written in Python
MIT License
322 stars 95 forks source link

country logic does not work for terms ending with '.' #40

Closed murphd40 closed 4 years ago

murphd40 commented 4 years ago
business_name = "Some Big Pharma sh.a."
x = cleanco(business_name)

print(x.business_name)
print(x.string_stripper(x.business_name))
print(x.clean_name())
print(x.country())

prints:

Some Big Pharma sh.a.
Some Big Pharma sh.a
Some Big Pharma
None

sh.a. is in the Albania terms:

https://github.com/psolin/cleanco/blob/56ff6542c339df625adcaf7f4ed4c81035fd575a/termdata.py#L46

It is not being recognized as Albanian because the . at the end of sh.a. is removed in:

https://github.com/psolin/cleanco/blob/56ff6542c339df625adcaf7f4ed4c81035fd575a/cleanco.py#L56

byrro commented 4 years ago

@psolin are you reviewing/accepting pull requests? I could take a look at this and other issues to contribute if it's welcome.

psolin commented 4 years ago

Yes, absolutely. I need to spend more time cleaning this up for sure.