Skip to content

Commit

Permalink
complete doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Feb 22, 2023
1 parent da506b0 commit ef95fa5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pymathics/natlang/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ class TextWords(_SpacyBuiltin):
>> TextWords["Hickory, dickory, dock! The mouse ran up the clock."]
= {Hickory, dickory, dock, The, mouse, ran, up, the, clock}
>> TextWords["Bruder Jakob, Schläfst du noch?", 2]
= {Bruder, Jakob}
"""

summary_text = "list the words in a string"
Expand Down
7 changes: 5 additions & 2 deletions pymathics/natlang/textual_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ class DictionaryLookup(_WordListBuiltin):
<dd>lookup first $n$ words that match the given $word$ or pattern.
</dl>
>> DictionaryLookup["bake" ~~ ___, 3]
= {bake, bakeapple, baked}
>> DictionaryLookup["baker" ~~ ___]
= {baker, baker's dozen, baker's eczema, baker's yeast, bakersfield, bakery}
>> DictionaryLookup["baker" ~~ ___, 3]
= {baker, baker's dozen, baker's eczema}
"""

summary_text = "Lookup words matching a pattern in a dictionary"
Expand Down

0 comments on commit ef95fa5

Please sign in to comment.