LHNCBC / metamaplite

A near real-time named-entity recognizer
https://metamap.nlm.nih.gov/MetaMapLite.shtml
Other
58 stars 14 forks source link

Negation Missing in JSON Output #18

Closed dcronkite closed 2 years ago

dcronkite commented 2 years ago

The json output in version MetaMapLite 3.6.2rc6 (and previous versions) does not contain negation output from the NegEx or Context algorithms.

E.g., running echo "no covid-19" | ./metamaplite.sh --pipe --outputformat=json

[
  {
    "matchedtext": "covid-19",
    "evlist": [
      {
        "score": 0,
        "matchedtext": "covid-19",
        "start": 3,
        "length": 8,
        "id": "ev0",
        "conceptinfo": {
          "conceptstring": "COVID-19",
          "sources": [
            "MTH",
            "SNOMEDCT_US"
          ],
          "cui": "C5203670",
          "preferredname": "COVID-19",
          "semantictypes": [
            "dsyn"
          ]
        }
      }
    ],
    "docid": "00000000.tx",
    "start": 3,
    "length": 8,
    "id": "en0",
    "fieldid": "text"
  }
]

Whereas mmi output contains the information:

00000000.tx|MMI|0.46|COVID-19|C5203670|[dsyn]|"COVID-19"-text-0-"covid-19"-NN-1|text|3/8||

Can this be added?

dcronkite commented 2 years ago

PR #16 could fix this issue.