Skip to content

Commit 996ac8a

Browse files
committed
update to new java and LanguageTool; remove old files
1 parent 1fadf6e commit 996ac8a

22 files changed

Lines changed: 109 additions & 343 deletions

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
__pycache__/
88
build/
99
dist/
10-
language_check/LanguageTool-*/
10+
language_tool_python/LanguageTool-*/

‎.travis.yml‎

Lines changed: 0 additions & 39 deletions
This file was deleted.

‎COPYING.LESSER‎

Lines changed: 0 additions & 165 deletions
This file was deleted.

‎Dockerfile‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎MANIFEST.in‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
exclude .travis.yml
2-
exclude Dockerfile
31
exclude Makefile
42
include COPYING
5-
include COPYING.LESSER
63
include README.rst
7-
include download_lt.py
84
include run_doctest.py
95
include test.bash
106
include test.py

‎Makefile‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
check:
22
pycodestyle \
3-
--exclude ./language_check/LanguageTool-* \
3+
--exclude ./language_tool_python/LanguageTool-* \
44
--ignore=E402,W504 \
5-
./language-check \
6-
./language_check/ \
5+
./language_tool_python \
6+
./language_tool_python/ \
77
$(wildcard *.py)
88
pylint \
99
--rcfile=/dev/null \
@@ -12,7 +12,7 @@ check:
1212
--disable=no-member \
1313
--disable=no-name-in-module \
1414
--disable=raising-bad-type \
15-
./language-check \
16-
$(wildcard ./language_check/*.py) \
15+
./language_tool_python \
16+
$(wildcard ./language_tool_python/*.py) \
1717
$(wildcard *.py)
1818
python setup.py --long-description | rstcheck -

README.rst renamed to README.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
language-check
2-
==============
1+
# language_tool_python
32

43
Python wrapper for LanguageTool.
54

6-
.. image:: https://travis-ci.org/myint/language-check.svg?branch=master
7-
:target: https://travis-ci.org/myint/language-check
5+
.. image:: https://travis-ci.org/myint/language_tool_python.svg?branch=master
6+
:target: https://travis-ci.org/myint/language_tool_python
87
:alt: Build status
98

10-
This is a fork of https://github.com/myint/language-check/ (which is a fork of
9+
This is a fork of https://github.com/myint/language_tool_python/ (which is a fork of
1110
https://bitbucket.org/spirit/language_tool) that produces more easily parsable
1211
results from the command-line.
1312

14-
Example usage
15-
-------------
13+
## Example usage
1614

1715
From the interpreter:
1816

19-
>>> import language_check
20-
>>> tool = language_check.LanguageTool('en-US')
17+
>>> import language_tool_python
18+
>>> tool = language_tool_python.LanguageTool('en-US')
2119
>>> text = u'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy'
2220
>>> matches = tool.check(text)
2321
>>> len(matches)
@@ -44,35 +42,33 @@ Suggestion: to the
4442

4543
Automatically apply suggestions to the text:
4644

47-
>>> language_check.correct(text, matches)
45+
>>> language_tool_python.correct(text, matches)
4846
'A sentence with an error in the Hitchhiker’s Guide to the Galaxy'
4947

5048
From the command line::
5149

5250
$ echo 'This are bad.' > example.txt
5351

54-
$ language-check example.txt
52+
$ language_tool_python example.txt
5553
example.txt:1:1: THIS_NNS[3]: Did you mean 'these'?
5654

5755

58-
Installation
59-
------------
56+
## Installation
6057

6158
To install via pip::
6259

63-
$ pip install --upgrade language-check
60+
$ pip install --upgrade language_tool_python
6461

6562
If you are using Python 2, you'll need to install 3to2 beforehand::
6663

6764
$ pip install --upgrade 3to2
6865

6966
To overwrite the host part of URL that is used to download LanguageTool-{version}.zip::
7067

71-
- SET LANGUAGE_CHECK_DOWNLOAD_HOST = [alternate URL]
68+
- SET language_tool_python_DOWNLOAD_HOST = [alternate URL]
7269

7370

74-
Prerequisites
75-
-------------
71+
## Prerequisites
7672

7773
- `Python 3.3+ <https://www.python.org>`_ (or 2.7)
7874
- `lib3to2 <https://bitbucket.org/amentajo/lib3to2>`_
@@ -84,18 +80,17 @@ The installation process should take care of downloading LanguageTool (it may
8480
take a few minutes). Otherwise, you can manually download
8581
`LanguageTool-stable.zip
8682
<https://www.languagetool.org/download/LanguageTool-stable.zip>`_ and unzip it
87-
into where the ``language_check`` package resides.
83+
into where the ``language_tool_python`` package resides.
8884

89-
Vim plugin
90-
----------
85+
## Vim plugin
9186

92-
To use language-check in Vim, install Syntastic_ and use the following
87+
To use language_tool_python in Vim, install Syntastic_ and use the following
9388
settings:
9489

9590
.. code-block:: vim
9691

97-
let g:syntastic_text_checkers = ['language_check']
98-
let g:syntastic_text_language_check_args = '--language=en-US'
92+
let g:syntastic_text_checkers = ['language_tool_python']
93+
let g:syntastic_text_language_tool_python_args = '--language=en-US'
9994

10095
Customize your language as appropriate.
10196

‎lang_tool_load_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+
lang_tool = language_tool_python.LanguageTool("en-US")
3+
print(lang_tool.check('ain\'t nothin but a thang'))
4+
5+

‎language-check‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)