Skip to content

Commit

Permalink
fix the example of applying kwja
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu-g committed Sep 18, 2023
1 parent 9aa5dcc commit f89221b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/apply_kwja.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# Create a KWJA instance.
kwja = KWJA()

# Apply KNP to a sentence.
sent = kwja.apply_to_sentence(sys.argv[1])
# Apply KWJA to a document.
doc = kwja.apply_to_document(sys.argv[1])

# Get information.
for mrph in sent.morphemes:
for mrph in doc.morphemes:
print(f"Text: {mrph.text}")
print(f"Reading: {mrph.reading}")
print(f"Lemma: {mrph.lemma}")
Expand Down

0 comments on commit f89221b

Please sign in to comment.