Eric Kafe

Results 106 comments of Eric Kafe

Changing the default output order of the relations would have far-reaching consequences, since it would modify the output of higher order functions like _closure_ and _tree_, and deeply alter the...

> Also, do any docstrings of functions that call _related() promise sorted results? None of these functions has any docstring, so they don't promise anything. Nevertheless, they have returned sorted...

Looping over all the noun synsets in WordNet shows some examples of differences in the _tree_ outputs. However no particular difference is ever guaranteed, since the unsorted order is random,...

What about just adding an optimized public _related_ method, and leaving everything else unchanged? ``` def related(self, relation_symbol): """ :param relation_symbol: the pointer symbol of a synset relation :type relation_symbol:...

@stevenbird, in the Wordnet db, relation targets are ordered by byte offset, which is not a meaningful order. Nltk makes it a set: > 436: self._pointers = defaultdict(set) > 1648:...

Returning unsorted results for all wordnet relations is a big change, that causes many failures in _test/wordnet.doctest_. Moreover, the number of failures changes randomly between subsequent runs: ``` 1248c1266 <...

@stevenbird, did you consider [the code included here](https://github.com/nltk/nltk/issues/3193#issuecomment-2028597251)? It has the desired effect, by giving access to an optimized _wnrel_ function, without breaking the default sort order? Changing the default...

CI fails only with Python 3.11 on macos-latest, because: > line 1: pytest: command not found

Thanks @purificant! Yes, this is due to a long-standing bug with the macos-latest cache. It only occurred randomly, so it remained somewhat mysterious, and @tomaarsen used to [fix it by...

I added ":param" descriptions suggested by Copilot. This duplicates some information, when the comments already describe the same parameters in plain text. On the other hand, the plain text descriptions...