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

validation #6

Open
13 of 17 tasks
odanoburu opened this issue Jul 23, 2019 · 1 comment
Open
13 of 17 tasks

validation #6

odanoburu opened this issue Jul 23, 2019 · 1 comment

Comments

@odanoburu
Copy link
Collaborator

odanoburu commented Jul 23, 2019

subsumes https://github.com/own-pt/own-en/issues/38

references

  • targets exist
  • pointers exist
  • frames exist (and only verbs specify them)
  • synset relations exist
  • word relations exist
  • no duplicate references (two different things with the same name -- if the lexical ids are correct does this ever happen?)
  • check symmetric relations? (I think it's good to have the redundancy)
    • probably best left to RDF schema validation
  • check there's a head synset to adjective satellites (similarTo relation)
select ?as
where {
  ?as rdf:type ns1:AdjectiveSatelliteSynset .
  FILTER NOT EXISTS {?as ns1:similarTo ?hs .}
  } LIMIT 10
  • check if relation is used in the proper place (word relations aren't used in synset positions and vice-versa)

sorting

  • check if words senses are sorted
  • check if synsets are sorted
  • check if word relations are sorted
  • check if synset relations are sorted
  • check if frames are sorted
  • check if examples are sorted

other

  • lexical indexing is correct
    • word sense that comes first has lower lexical id
    • no two words with the same lexical id

please add more suggestions.

odanoburu added a commit that referenced this issue Jul 24, 2019
related to #6
* add bifunctor instance to validate

* add type synonyms for validation

* add Ord instances
odanoburu added a commit that referenced this issue Jul 25, 2019
@odanoburu odanoburu mentioned this issue Jul 26, 2019
14 tasks
odanoburu added a commit that referenced this issue Aug 19, 2019
- word sense duplicates (in the same synset)
- word pointers
- synset relations

related to #6

* add labels to errors

can be warnings or full-blown errors
odanoburu added a commit that referenced this issue Aug 19, 2019
- when checking just a lexicographer file, we still check for
  duplicates in all of wordnet; but doing it for each synset is more
  expensive than checking the index directly

related to #6

* fix index key implementation
odanoburu added a commit that referenced this issue Aug 20, 2019
- was previously allowing duplicate words in a synset if they had
  different lexical ids (but having two words with the same lexical
  form in the same synset doesn't make sense regardless of their
  lexical ids)

related to #6
odanoburu added a commit that referenced this issue Aug 22, 2019
- so that we can access configuration values easily throughout the
  application

* convert relation names when exporting RDF

related to #5

* validate relation names in lexfiles

related to #6
odanoburu added a commit that referenced this issue Aug 30, 2019
- use commas for pos column
- add satellite adjectives PoS

* validation

- check that a relation has the correct domain (either synset or
  wordsense of the appropriate PoS)

obs: maybe this is too much to check in the parser phase and we should
defer it to validation? (the parser is not so easy to read now)

related to #6
@odanoburu
Copy link
Collaborator Author

odanoburu commented Oct 23, 2019

to check reflexivity we can use the following queries, which uncovered a few problems (although most of them are related to own-pt/openWordnet-PT#151)

### problems here
select ?s1 ?s2 # problems
where {
  ?s1 ns1:antonymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:antonymOf ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:hyponymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:hypernymOf ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:hypernymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:hyponymOf ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:hasInstance ?s2 .
  FILTER NOT EXISTS {?s2 ns1:instanceOf ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:instanceOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:hasInstance ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:memberHolonymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:memberMeronymOf ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:memberMeronymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:memberHolonymOf ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:partHolonymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:partMeronymOf ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:partMeronymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:partHolonymOf ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:substanceHolonymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:substanceMeronymOf ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:substanceMeronymOf ?s2 .
  FILTER NOT EXISTS {?s2 ns1:substanceHolonymOf ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:similarTo ?s2 .
  FILTER NOT EXISTS {?s2 ns1:similarTo ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:attribute ?s2 .
  FILTER NOT EXISTS {?s2 ns1:attribute ?s1}
} LIMIT 10
#

#
select ?s1 ?s2
where {
  ?s1 ns1:sameVerbGroupAs ?s2 .
  FILTER NOT EXISTS {?s2 ns1:sameVerbGroupAs ?s1}
} LIMIT 10
#

### problems here
select ?s1 ?s2
where {
  ?s1 ns1:derivationallyRelated ?s2 .
  FILTER NOT EXISTS {?s2 ns1:derivationallyRelated ?s1}
} LIMIT 10
#

## no problems here, actually, just wrong URI see
## https://github.com/own-pt/openWordnet-PT/issues/151
select ?s1 ?s2
where {
  ?s1 ns1:classifiedByTopic ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiesByTopic ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:classifiesByTopic ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiedByTopic ?s1}
} LIMIT 10
#

## no problems here, actually, just wrong URI see
## https://github.com/own-pt/openWordnet-PT/issues/151
select ?s1 ?s2
where {
  ?s1 ns1:classifiedByRegion ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiesByRegion ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:classifiesByRegion ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiedByRegion ?s1}
} LIMIT 10
#

## no problems here, actually, just wrong URI see
## https://github.com/own-pt/openWordnet-PT/issues/151
select ?s1 ?s2
where {
  ?s1 ns1:classifiedByUsage ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiesByUsage ?s1}
} LIMIT 10

select ?s1 ?s2
where {
  ?s1 ns1:classifiesByUsage ?s2 .
  FILTER NOT EXISTS {?s2 ns1:classifiedByUsage ?s1}
} LIMIT 10
#

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

No branches or pull requests

1 participant