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

Add 'depth' and 'provenance' to SynsetRelation #1

Open
DavidLeoni opened this issue May 17, 2016 · 1 comment
Open

Add 'depth' and 'provenance' to SynsetRelation #1

DavidLeoni opened this issue May 17, 2016 · 1 comment
Assignees
Milestone

Comments

@DavidLeoni
Copy link
Member

DavidLeoni commented May 17, 2016

For fast retrieval of hypernyms / hyponyms at given depth adding a depth attribute to UBY SynsetRelation would help. To enable this, we can either

a) add a new table to the db (but this would require extra joins / duplicated data)
b) somewhat extend existing uby SynsetRelation class
c) use UBY's frequency attribute (but this alters its semantics)

Seems b) is possible by hacking a bit UBY hibernate configuration mechanism. We can:

  1. create our own MySynsetRelation class which extends SynsetRelation
  2. load all UBY hibernate hbm.xml files
  3. replace in the files all the class strings referring to UBY SynsetRelation with our MySynsetRelation

Problem of the approach: the new attribute depth still won't be read from input LMF XMLs, but this is not an issue for now as depth can be computed and stored into the db each time the system is initialized.

@DavidLeoni DavidLeoni self-assigned this May 17, 2016
@DavidLeoni DavidLeoni added this to the 0.1 milestone May 17, 2016
@DavidLeoni DavidLeoni changed the title Add 'depth' to SynsetRelation Add 'depth' and 'provenance' to SynsetRelation May 20, 2016
@DavidLeoni
Copy link
Member Author

DavidLeoni commented May 20, 2016

Since it's not possible to have two SynsetRelations residing in separate lexicons and both starting from the same synset, we can add synthetic relations to the original lexicon and add a custom attribute provenance to mark the relation origin. To comply with Hibernate, it's also better to choose a one-table-per-hierarchy strategy and add a column DTYPE.

DavidLeoni added a commit that referenced this issue May 25, 2016
Squashed commit of the following:

commit 107b212
Author: David Leoni <[email protected]>
Date:   Wed May 25 16:49:42 2016 +0200

    some cleanup

commit 0b2b409
Author: David Leoni <[email protected]>
Date:   Wed May 25 12:56:08 2016 +0200

    Implemented and tested SynsetRelation transitive closure

commit 3eaa773
Author: David Leoni <[email protected]>
Date:   Wed May 25 11:46:35 2016 +0200

    added first implmenetation prototype of transitive closure computation

    - added InsertionStats class

commit 37a3afe
Author: David Leoni <[email protected]>
Date:   Tue May 24 17:32:32 2016 +0200

    Streamlined tests by implementing SmuTester.checkEquals(LexicalResource, Uby)

commit 64ea472
Author: David Leoni <[email protected]>
Date:   Tue May 24 17:31:39 2016 +0200

    clean up, added test for normalized dups

commit cdd7571
Author: David Leoni <[email protected]>
Date:   Tue May 24 16:22:02 2016 +0200

    clean up, added test for normalized dups

commit 2b83a3e
Author: David Leoni <[email protected]>
Date:   Tue May 24 15:48:50 2016 +0200

    Find comfortable way to write write into SynsetRelation graph

    - Added prototype to normalize the SynsetRelation graph
    - implmeneted hibernate one-table-per-hierarchy strategy for SynsetRelation table
    - both extendHibernate and normalize prototype tests pass with maven

commit 589b732
Author: David Leoni <[email protected]>
Date:   Fri May 20 20:06:18 2016 +0200

    implemented normalizeGraph and LmfBuilder

    - normalizeGraph test fails
    - seems db tests are dependent!

commit cc469ba
Author: David Leoni <[email protected]>
Date:   Fri May 20 15:40:06 2016 +0200

    - fixed tests, now they all pass

    - now by default SmuUtils.getHibernateConfig creates db if not existing
    - removed experimental MySynsetRelation stuff in tests

commit 06c4b3d
Author: David Leoni <[email protected]>
Date:   Fri May 20 11:28:04 2016 +0200

    Some additions and hibernate testing

    - added custom "provenance" field to SmuSynsetRelation
    - tried naive LexicalResource loading into db via LMFDBTransform, doesn't work for hibernate :-/
    - added /conf folder

commit f3b8b37
Author: David Leoni <[email protected]>
Date:   Wed May 18 19:13:50 2016 +0200

    restructured code, adopted 'Smu' as project prefix

    - moved experimental depth hibernate attribute from test to main
    - implemented SmuUtils.saveLexicalResourceToDb
    - copied into SmuUtils come check* methods from Guava and TodUtils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant