Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanco('AMBA').clean_name() is empty #57

Open
dbradshaw opened this issue Jul 29, 2020 · 5 comments
Open

cleanco('AMBA').clean_name() is empty #57

dbradshaw opened this issue Jul 29, 2020 · 5 comments
Labels
parsing Name parsing result is not correct

Comments

@dbradshaw
Copy link

No description provided.

@petri
Copy link
Collaborator

petri commented Sep 30, 2020

What should it be, and why?

@dbradshaw
Copy link
Author

dbradshaw commented Oct 2, 2020 via email

@petri
Copy link
Collaborator

petri commented Oct 3, 2020

We cannot fix this if we don't know what the result should be. Would you at least know in which country this "AMBA" is in?

@dbradshaw
Copy link
Author

dbradshaw commented Oct 3, 2020 via email

@petri petri added the parsing Name parsing result is not correct label Jan 30, 2021
@FBnil
Copy link
Contributor

FBnil commented Aug 19, 2022

This will always be a problem, a company that is named after a termdata (in this case from Denmark). terms_by_country might need to be limited to the countries the user expects/does business with or, the code needs to be changed that when you remove the last term, and the result is empty, rather than empty, you return the first word in the received string, as a "most probable name". To not break backwards compatibility, a new function would need to be made (or a flag might be set to change the behavior).

print(basename('AMBA')) # ""
print(basenameorfirst('AMBA')) # "AMBA"
print(basename('inc & co')) # ""
print(basenameorfirst('inc & co')) # "inc"

This would allow for companies name like 'inc & co', where even though inc is a term, it's also the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parsing Name parsing result is not correct
Projects
None yet
Development

No branches or pull requests

3 participants