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

Parse the description format #3

Open
maxadamski opened this issue Aug 18, 2021 · 1 comment
Open

Parse the description format #3

maxadamski opened this issue Aug 18, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@maxadamski
Copy link
Owner

Currently, nothing is done with the description field in Synset and LexicalUnit. Information about the description format comes in PlWordNets readme.

Parsing should be done lazily to avoid slowing down the initial loading of PlWordNet into memory.

Example description:

##K: og. ##D: owoc (wielopestkowiec) jabłoni. [##P: Jabłka są kształtem zbliżone do kuli, z zagłębieniem na szczycie, z którego wystaje ogonek.] {##L: http://pl.wikipedia.org/wiki/Jab%C5%82ko}

Desired behavior:

A new (memoized) method rich_description returns the following dict:

dict(
  qualifier='og.',
  definition='owoc (wielopestkowiec) jabłoni.',
  examples=['Jabłka są kształtem zbliżone do kuli, z zagłębieniem na szczycie, z którego wystaje ogonek'],
  sources=['http://pl.wikipedia.org/wiki/Jab%C5%82ko'])
@maxadamski maxadamski added the enhancement New feature or request label Aug 18, 2021
@maxadamski maxadamski changed the title Parse the PLWN description format Parse the description format Aug 18, 2021
@maxadamski maxadamski self-assigned this Aug 24, 2021
@maxadamski
Copy link
Owner Author

maxadamski commented Aug 24, 2021

Mostly done.

Sentiment annotations in descriptions (##A1, ##A2) and multi-word lexical units (<##DD>, <##s>, ...) still need some work.

There are many descriptions that do not conform to the described format. Should something be done about them? Currently, if parsing LU description returned an error, I try parsing Synset definition or description, and if this succeeds (it does most of the time), the LU description is not counted as malformed.

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

No branches or pull requests

1 participant