You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: