Skip to content

Commit

Permalink
maint: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
arachez committed Feb 27, 2025
1 parent 2cf2825 commit bc70526
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion wsd/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .baseline import JMDict
"""A collection of WSD models."""
from .baseline import JMDict
9 changes: 5 additions & 4 deletions wsd/models/baseline.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""A simple dictionary interface for JMDict."""
from wsd.parsers import JMDictParser


Expand All @@ -12,7 +13,7 @@ def search(self, text):
Currently returns all entries that contain the text in either the kanji
or reading.
Parameters
----------
text : str
Expand All @@ -27,13 +28,13 @@ def search(self, text):
if r_ele.reb == text:
res.append(entry)
return res

def feeling_lucky(self, text):
"""Return the first entry found.
Currently returns the first entry that contains the text in either the
kanji or reading.
Parameters
----------
text : str
Expand All @@ -43,4 +44,4 @@ def feeling_lucky(self, text):
return entries[0] if entries else None


__all__ = ['JMdict']
__all__ = ['JMDict']

0 comments on commit bc70526

Please sign in to comment.