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

do we need to lowercase the string provided by user in tnrs_match_names? #106

Open
fmichonneau opened this issue Jan 15, 2018 · 4 comments

Comments

@fmichonneau
Copy link
Member

tnrs_match_names lowercases the string provided by the user in the results, do we need to do this?

@josephwb
Copy link
Contributor

Hmm. I think so? @jar398 should know. Maybe even @jimallman.

@jar398
Copy link

jar398 commented Jan 15, 2018

I don't know what tnrs_match_names is but here is the Open Tree documentation for match_names, with examples.

https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-APIs#match_names

@jimallman
Copy link

jimallman commented Jan 15, 2018

Yes, I believe the concern is with the search_string field of the response (from the API example linked above):

      "search_string" : "aster",
      "matched_name" : "Aster",

... since I'm not seeing lower-case text anywhere else. It looks like search text is always forced to lower-case by taxomachine's MultiNameContextQuery.

EDIT TO ADD: Just to connect the dots, here's the chain of calls that led me here:
https://github.com/OpenTreeOfLife/pyopentree/blob/master/pyopentree/opentreeservice.py#L453

https://github.com/OpenTreeOfLife/pyopentree/blob/master/pyopentree/opentreeservice.py#L532-L534

https://github.com/OpenTreeOfLife/taxomachine/blob/d1ec2a71a22bb2629f316d5ef8af8e50d11dc7d4/src/main/java/org/opentree/taxonomy/plugins/tnrs_v2.java#L255

https://github.com/OpenTreeOfLife/taxomachine/blob/d1ec2a71a22bb2629f316d5ef8af8e50d11dc7d4/src/main/java/org/opentree/tnrs/queries/MultiNameContextQuery.java#L83

@josephwb
Copy link
Contributor

Thanks @jimallman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants