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

bug when loading Lexicons via LexicalResource: single Lexicon returned #131

Open
judithek opened this issue May 7, 2015 · 0 comments
Open
Assignees

Comments

@judithek
Copy link
Member

judithek commented May 7, 2015

SH: Running the following snippet on a 070-snapshot DB shows that the loading of Lexicon instances via LexicalResource does not work properly:

Uby uby = new Uby(dbConfig);
LexicalResource lexicalResource = uby.getLexicalResource("UBY");
System.err.println(lexicalResource.getLexicons().size()); // prints 1 (not expected)
System.err.println(uby.getLexicons().size()); // prints the correct number of lexicons (expected outcome)

Note that all lexicons are associated with the LexicalResource in the DB (lexicalResourceId="UBY").

Maybe some issue with the hibernate api/hibernate mappings?

ChM: Looked into that. The lexicons of a lexical resource are mapped as a list (i.e., a collection with a specific order as determined by the "idx" column). In the public UBY databases, this idx is 0 for all lexicons. Hibernate thus conflates all lexicons into one. For the upcoming release, we should make sure that the lexicons indexes are set incrementally during the database post-processing.

In later releases, we should change to mapping from list to set or bag, since the idx column is not really required. Actually, having a natural index for a lexicon does not make sense IMHO.

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

2 participants