UCREL / pymusas

Python Multilingual Ucrel Semantic Analysis System
https://ucrel.github.io/pymusas/
Apache License 2.0
30 stars 12 forks source link

USAS tags explain function #14

Open apmoore1 opened 2 years ago

apmoore1 commented 2 years ago

spaCy has this really great function called explain, whereby it will output the verbose version of the tag, e.g.

import spacy
assert 'adjective' == spacy.explain('ADJ')

I was thinking we could have the same functionaility within pymusas for USAS tags, what do you think @perayson , e.g.

import pymusas
assert 'Time: General' == pymusas.explain('T1.1')

The hard part with the explain function could come when including the symbols within the USAS tagset like the rarity symbols and the plus and minus symbols. The hard part about this would be how to represent that in the more verbose setting, e.g. if it was the tag X1+ the verbose could be either General positive or General (positive) whereby all extra symbol text is added to the original tag text within parentheses. I think I prefer the parentheses version.