Skip to content

Commit 562f1e9

Browse files
committed
refactor & support new Match API
1 parent 81bd274 commit 562f1e9

12 files changed

Lines changed: 857 additions & 858 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ From the interpreter:
1515

1616
Check out some ``Match`` object attributes:
1717

18-
> matches[0].fromy, matches[0].fromx
19-
(0, 16)
2018
> matches[0].ruleId, matches[0].replacements
2119
('EN_A_VS_AN', ['an'])
22-
> matches[1].fromy, matches[1].fromx
23-
(0, 50)
2420
> matches[1].ruleId, matches[1].replacements
2521
('TOT_HE', ['to the'])
2622

‎easy_test.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import language_tool_python
2+
tool = language_tool_python.LanguageTool('en-US')
3+
text = u'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy'
4+
matches = tool.check(text)
5+
len(matches)

0 commit comments

Comments
 (0)