Issue 152 in uby: bug when loading Lexicons via LexicalResource: single Lexicon returned

1 view
Skip to first unread message

u...@googlecode.com

unread,
Apr 10, 2015, 6:44:05 AM4/10/15
to uby-dev...@googlegroups.com
Status: Accepted
Owner: Hartmann...@gmail.com
Labels: Type-Defect Priority-Medium

New issue 152 by Hartmann...@gmail.com: bug when loading Lexicons via
LexicalResource: single Lexicon returned
https://code.google.com/p/uby/issues/detail?id=152

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?


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

u...@googlecode.com

unread,
Apr 10, 2015, 7:02:04 AM4/10/15
to uby-dev...@googlegroups.com
Updates:
Labels: Milestone-0.8.0

Comment #1 on issue 152 by chmeyer.de: bug when loading Lexicons via
LexicalResource: single Lexicon returned
https://code.google.com/p/uby/issues/detail?id=152

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.
Reply all
Reply to author
Forward
0 new messages