Changes between Version 2 and Version 3 of Chared


Ignore:
Timestamp:
05/27/19 17:36:32 (5 years ago)
Author:
admin
Comment:

Version 2.0

Legend:

Unmodified
Added
Removed
Modified
  • Chared

    v2 v3  
    44
    55== Installation ==
    6 1. Make sure you have Python 2.6 or later and lxml library version 2.2.4 or later installed.
     61. Make sure you have Python 3.6 or later and lxml library version 4.1 or later installed.
    772. Download the sources:
    88{{{
    9 wget http://corpus.tools/raw-attachment/wiki/Downloads/chared-1.2.2.tar.gz
     9wget http://corpus.tools/raw-attachment/wiki/Downloads/chared-2.0.tar.gz
    1010}}}
    11113. Extract the downloaded file:
    1212{{{
    13 tar xzvf chared-1.2.tar.gz
     13tar xzvf chared-2.0.tar.gz
     14cd chared-2.0/
    1415}}}
    15 4. Install the package (you may need sudo or a root shell for the latter command):
     164. Install the package (to install for all users, omit --user, you may need sudo or a root shell):
    1617{{{
    17 cd chared-1.2/
    18 python setup.py install
     18python3 setup.py install --user
    1919}}}
    2020
     
    4141
    4242{{{
    43 >>> import urllib2
     43>>> from urllib.request import urlopen
    4444>>> import chared.detector
    45 >>> page = urllib2.urlopen('http://nlp.fi.muni.cz/cs/nlplab').read()
     45>>> page = urlopen('https://nlp.fi.muni.cz/').read()
    4646>>> cz_model_path = chared.detector.get_model_path('czech')
    4747>>> cz_model = chared.detector.EncodingDetector.load(cz_model_path)