[ https://issues.apache.org/jira/browse/PYLUCENE-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181993#comment-17181993 ]
Andreas Vajda commented on PYLUCENE-55: --------------------------------------- I see 9 getSynsets() methods declared in BabelNet.h in my build: {code} ::java::util::List getSynsets(const JArray< ::it::uniroma1::lcl::kb::ResourceID > &) const; ::java::util::List getSynsets(const ::java::lang::String &) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &) const; ::java::util::List getSynsets(const ::java::lang::String &, jboolean) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &, jboolean) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &, const ::com::babelscape::util::POS &) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &, const ::com::babelscape::util::POS &, const JArray< ::it::uniroma1::lcl::babelnet::data::BabelSenseSource > &) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &, const ::com::babelscape::util::POS &, jboolean) const; ::java::util::List getSynsets(const ::java::lang::String &, const ::it::uniroma1::lcl::jlt::util::Language &, const ::com::babelscape::util::POS &, jboolean, const JArray< ::it::uniroma1::lcl::babelnet::data::BabelSenseSource > &) const; {code} In other words, I have not been able to reproduce the problem you reported. > JCC creates the classes in non-deterministic order > -------------------------------------------------- > > Key: PYLUCENE-55 > URL: https://issues.apache.org/jira/browse/PYLUCENE-55 > Project: PyLucene > Issue Type: Bug > Reporter: Andrea Sterbini > Priority: Major > > I am trying to wrap the BabelNet API code. > The resulting module is non-deterministically not-working (once every 5 I get > it OK). > This seems to be related to the order the classes are handled, because they > are kept in a set, which has nondeterministic order. > By changing cpp.py at line 696 to sort the class names I get a working module. > {code:java} > // changed from > for cls in todo: > {code} > {code:java} > // to > for cls in sorted(todo, key=lambda c: c.getName()):{code} > I have been luky with this way to order the classes. Possibly a better > algorithm exists to fix this bug. -- This message was sent by Atlassian Jira (v8.3.4#803005)