Changes between Version 2 and Version 3 of Chared
- Timestamp:
- 05/27/19 17:36:32 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Chared
v2 v3 4 4 5 5 == Installation == 6 1. Make sure you have Python 2.6 or later and lxml library version 2.2.4or later installed.6 1. Make sure you have Python 3.6 or later and lxml library version 4.1 or later installed. 7 7 2. Download the sources: 8 8 {{{ 9 wget http://corpus.tools/raw-attachment/wiki/Downloads/chared- 1.2.2.tar.gz9 wget http://corpus.tools/raw-attachment/wiki/Downloads/chared-2.0.tar.gz 10 10 }}} 11 11 3. Extract the downloaded file: 12 12 {{{ 13 tar xzvf chared-1.2.tar.gz 13 tar xzvf chared-2.0.tar.gz 14 cd chared-2.0/ 14 15 }}} 15 4. Install the package ( you may need sudo or a root shell for the latter command):16 4. Install the package (to install for all users, omit --user, you may need sudo or a root shell): 16 17 {{{ 17 cd chared-1.2/ 18 python setup.py install 18 python3 setup.py install --user 19 19 }}} 20 20 … … 41 41 42 42 {{{ 43 >>> import urllib243 >>> from urllib.request import urlopen 44 44 >>> import chared.detector 45 >>> page = url lib2.urlopen('http://nlp.fi.muni.cz/cs/nlplab').read()45 >>> page = urlopen('https://nlp.fi.muni.cz/').read() 46 46 >>> cz_model_path = chared.detector.get_model_path('czech') 47 47 >>> cz_model = chared.detector.EncodingDetector.load(cz_model_path)