question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add a check function

See original GitHub issue

I would like to add a module (check.py) that checks for various issues with a wordnet. The goal is to help developers avoid producing wordnets with structural problems. It would duplicate some of the functionality of the validate.py in the https://github.com/globalwordnet/english-wordnet/ and the checks of the https://github.com/globalwordnet/OMW but make them more widely available.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
goodmamicommented, Oct 6, 2021

I would have been hesitant, initially, as this kind of operation is probably only useful for wordnet authors, but there have been many easy-to-detect-if-you-know-what-to-look-for kind of issues with some wordnets of late, so it makes sense to make the tests easy to run. It would be useful if each test could be run individually. It would also be useful if the tests could be run from the command line.

Here’s an initial list of tests:

  • Every lexical entry has at least 1 sense
  • Every synset has at least 1 member
  • Synsets should have the same POS as their members (but s on a synset implies a on the member)
  • Synsets should have the same POS as their hypernyms
  • Inverse relations are present (e.g., hypernym/hyponym)
  • Each ILI is assigned to at most one synset in a lexicon

Some simple things are already checked by wn.lmf or when adding a lexicon to the database:

  • POS values are within n, v, a, r, and s (currently a warning is issued when reading the XML file)
  • IDs are unique (sqite3 raises an integrity error on the uniqueness violation)
  • Relation names are valid (currently wn.lmr throws an error if not)

Some things are not checked at this level but should be:

  • POS on Lemma should not include s

Feel free to add more checks.

0reactions
goodmamicommented, Nov 4, 2021

After recent discussions I’m starting to have a nagging idea that this should be a separate package. There are some benefits:

  • Wn is leaner for normal users
  • omw-data can use it for validation without waiting for Wn 0.9.0 (a one-time benefit)
  • Dependencies like NetworkX can be added without complications
Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a check box or option button (Form controls)
To add a check box, click the Developer tab, click Insert, and under Form Controls, click · Click in the cell where you...
Read more >
SQL CHECK Constraint - W3Schools
The CHECK constraint is used to limit the value range that can be placed in a column. If you define a CHECK constraint...
Read more >
Custom function with check constraint SQL Server 2008
CREATE FUNCTION dbo. ... WHERE venue_id = @venue_id RETURN @retval END; GO ALTER TABLE events ADD CONSTRAINT chkVenueCapacity CHECK (dbo.
Read more >
How to Insert Checkbox in Excel (Easy Step-by-Step Guide)
Go to Developer Tab –> Controls –> Insert –> Form Controls –> Check Box. · Click anywhere in the worksheet, and it will...
Read more >
How to insert a tick symbol (checkmark) in Excel - Ablebits
How to insert tick in Excel using the CHAR function. Perhaps it's not a conventional way to add a tick or cross symbol...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found