Skip to content

Commit 095eebe

Browse files
committed
Rename test file. Update CHANGES.rst
1 parent ef203d7 commit 095eebe

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

CHANGES.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
CHANGES
22
=======
33

4+
9.0.0
5+
-----
6+
7+
Sept 1, 2025
8+
9+
* Add Python 3.13 support. Drop support for Python 3.8 and Python 3.9
10+
* Update to 9.0.0 Mathics3 API
11+
* Turn Document organization into a Guide section
12+
13+
414
8.0.1
515
-----
616

test/test_ntlk.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# -*- coding: utf-8 -*-
2+
from .helper import check_evaluation, session
3+
4+
5+
def test_natlang():
6+
7+
session.evaluate(
8+
"""
9+
LoadModule["pymathics.natlang"]
10+
"""
11+
)
12+
13+
for str_expr, str_expected, message in (
14+
(
15+
'WordCount["A long time ago"]',
16+
"4",
17+
"WordCount",
18+
),
19+
(
20+
"Length[WordList[]]>10000",
21+
"True",
22+
"WordList",
23+
),
24+
(
25+
'TextWords["Hickory, dickory, dock! The mouse ran up the clock."]',
26+
'{"Hickory", "dickory", "dock", "The", "mouse", "ran", "up", "the", "clock"}',
27+
"TextWords",
28+
),
29+
(
30+
'TextSentences["Night and day. Day and night."]',
31+
'{"Night and day.", "Day and night."}',
32+
"TextSentences",
33+
),
34+
(
35+
'TextSentences["Mr. Jones met Mrs. Jones."]',
36+
'{"Mr. Jones met Mrs. Jones."}',
37+
"TextSentences with Abbreviations",
38+
),
39+
# (
40+
# 'DeleteStopwords[{"Somewhere", "over", "the", "rainbow"}]',
41+
# '{"rainbow"}',
42+
# "DeleteStopWords",
43+
# ),
44+
(
45+
'WordFrequency["Apple Tree", "apple", IgnoreCase -> True]',
46+
"0.5",
47+
"WordFrequency",
48+
),
49+
(
50+
'TextCases["I was in London last year.", "Pronoun"]',
51+
'{"I"}',
52+
"TextCases",
53+
),
54+
# (
55+
# 'Pluralize["try"]',
56+
# '"I"',
57+
# "Pluralize",
58+
# ),
59+
):
60+
check_evaluation(str_expr, str_expected, message)

0 commit comments

Comments
 (0)