OpenTreeOfLife / taxomachine

taxonomy graphdb
Other
7 stars 4 forks source link

exact match to synonym not returned from #52

Closed mtholder closed 10 years ago

mtholder commented 10 years ago

Nandina is a junior synonym of Labeo in the animal code. It is also the correct genus name in the botanical code. Note that the animal name is not returned in the call to "All Life" but is returned (as an "is_approximate_match" : false match) if you specify the animals context.

Seems like we want to alert users to the potential homonym, so we'd like to see it returned in the "all life" call.

Curl below...

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://api.opentreeoflife.org/taxomachine/ext/TNRS/graphdb/contextQueryForNames --data '{"names": ["Nandina"], "contextName": "All life"}'

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://api.opentreeoflife.org/taxomachine/ext/TNRS/graphdb/contextQueryForNames --data '{"names": ["Nandina"], "contextName": "Animals"}'
josephwb commented 10 years ago

Fixed typos in curl calls above.

chinchliff commented 10 years ago

Yes I agree, if we specify the context to include the synonym, it should be returned in the results. I'll look into this today

On Wednesday, June 18, 2014, Joseph W. Brown notifications@github.com wrote:

Fixed typos in curl calls above.

— Reply to this email directly or view it on GitHub https://github.com/OpenTreeOfLife/taxomachine/issues/52#issuecomment-46424894 .

chinchliff commented 10 years ago

Just an incremental update for posterity. I made some progress on this, but there still seem to be some bugs. This should make it into the next major taxomachine release (currently being debugged on the dev server)

chinchliff commented 10 years ago

Ok, this should be working now (on devapi). Same problems as issues #57 and #51.

All life returns all instances of name (including synonyms):

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://devapi.opentreeoflife.org/taxomachine/ext/TNRS/graphdb/contextQueryForNames --data '{"names": ["Nandina"], "contextName": "All life"}'
{
  "governing_code" : "undefined",
  "unambiguous_name_ids" : [ "Nandina" ],
  "unmatched_name_ids" : [ ],
  "matched_name_ids" : [ "Nandina" ],
  "context" : "All life",
  "includes_deprecated_ids" : false,
  "includes_dubious_names" : false,
  "taxonomy" : {
    "author" : "open tree of life project",
    "weburl" : "https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-Taxonomy",
    "source" : "ott2.8"
  },
  "results" : [ {
    "id" : "Nandina",
    "matches" : [ {
      "is_deprecated" : false,
      "dubious_name" : false,
      "is_synonym" : false,
      "flags" : [ ],
      "is_perfect_match" : true,
      "search_string" : "nandina",
      "score" : 1.0,
      "is_approximate_match" : false,
      "is_homonym" : false,
      "matched_ott_id" : 681927,
      "matched_node_id" : 4205837,
      "rank" : "",
      "matched_name" : "Nandina",
      "unique_name" : "Nandina (genus in subfamily Nandinoideae)",
      "nomenclature_code" : "ICN",
      "synonym_or_homonym_status" : "known"
    }, {
      "is_deprecated" : false,
      "dubious_name" : false,
      "is_synonym" : true,
      "flags" : [ "EDITED", "SIBLING_LOWER" ],
      "is_perfect_match" : false,
      "search_string" : "nandina",
      "score" : 1.0,
      "is_approximate_match" : false,
      "is_homonym" : false,
      "matched_ott_id" : 160620,
      "matched_node_id" : 3427360,
      "rank" : "",
      "matched_name" : "Labeo",
      "unique_name" : "Labeo (genus in superfamily Cyprinoidea)",
      "nomenclature_code" : "ICZN",
      "synonym_or_homonym_status" : "known"
    } ]
  } ]
}

Animals only returns only the synonym:

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://devapi.opentreeoflife.org/taxomachine/ext/TNRS/graphdb/contextQueryForNames --data '{"names": ["Nandina"], "contextName": "Animals"}'
{
  "governing_code" : "ICZN",
  "unambiguous_name_ids" : [ ],
  "unmatched_name_ids" : [ ],
  "matched_name_ids" : [ "Nandina" ],
  "context" : "Animals",
  "includes_deprecated_ids" : false,
  "includes_dubious_names" : false,
  "taxonomy" : {
    "author" : "open tree of life project",
    "weburl" : "https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-Taxonomy",
    "source" : "ott2.8"
  },
  "results" : [ {
    "id" : "Nandina",
    "matches" : [ {
      "is_deprecated" : false,
      "dubious_name" : false,
      "is_synonym" : true,
      "flags" : [ "EDITED", "SIBLING_LOWER" ],
      "is_perfect_match" : false,
      "search_string" : "nandina",
      "score" : 1.0,
      "is_approximate_match" : false,
      "is_homonym" : false,
      "matched_ott_id" : 160620,
      "matched_node_id" : 3427360,
      "rank" : "",
      "matched_name" : "Labeo",
      "unique_name" : "Labeo (genus in superfamily Cyprinoidea)",
      "nomenclature_code" : "ICZN",
      "synonym_or_homonym_status" : "known"
    } ]
  } ]
}