diff -r 949d496c4e96 -r 60a1fbdbbed3 src/source/plugins.rst --- a/src/source/plugins.rst Wed May 09 17:33:41 2018 +0200 +++ b/src/source/plugins.rst Tue May 15 18:31:37 2018 +0200 @@ -13,7 +13,7 @@ Visit https://www.elastic.co/ to learn how to install Elasticsearch Server, and how install `ingest-attachment` plug-in -.. tips:: Documentation for installing ElasticSearch 5.4 +.. tip:: Documentation for installing ElasticSearch 5.4 - https://www.elastic.co/guide/en/elasticsearch/reference/5.4/gs-installation.html - https://www.elastic.co/guide/en/elasticsearch/plugins/5.4/ingest-attachment.html @@ -79,7 +79,7 @@ 3. Create or update index: '''''''''''''''''''''''''' -You have to index PyAMS objects into ES database. From a shell: +You have to Update ElasticSearch indexes with all database contents with ``pymas_es_index``. From a shell: .. code-block:: bash @@ -93,7 +93,7 @@ =============================== -With the package *PyAMS_nltk* PyAMS can use the NLTK features +PyAMS enjoy the NLTK features through the *PyAMS_calalog* .. seealso:: @@ -101,12 +101,12 @@ +Initializing NLTK (Natural Language Toolkit) +-------------------------------------------- -Initializing NLTK ------------------ - -Some NLTK (Natural Language Toolkit) tokenizers and stopwords utilities are used to index fulltext contents elements. -This package requires downloading and configuration of several elements which are done as follow: +Some NLTK Collections like **tokenizers** and **stopwords** utilities are used to index fulltext contents +elements. You can enhanced NTKL indexation according to your own needs. This package requires downloading and +configuration of several elements which are done as follow: *1. Run the Python shell with PyAMS environment:* @@ -118,12 +118,24 @@ *2. In the Python shell:* -.. code-block:: python +.. code-block:: pycon >>> import nltk >>> nltk.download() -.. code-block:: python + +*3. Configuration installation directory:* + +.. tip:: + + On Debian GNU/Linux, you can choose any directory between '*~/nltk_data*' (where '~' is the homedir of user running + Pyramid application), '*/usr/share/nltk_data*', '*/usr/local/share/nltk_data*', '*/usr/lib/nltk_data*' and + '*/usr/local/lib/nltk_data*' + + Please check if you have permission to write to this directory + + +.. code-block:: shell NLTK Downloader --------------------------------------------------------------------------- @@ -138,33 +150,44 @@ Local Machine: - Data directory: /home/tflorac/nltk_data - --------------------------------------------------------------------------- - s) Show Config u) Set Server URL d) Set Data Dir m) Main Menu - --------------------------------------------------------------------------- + Config> d New directory> /usr/local/lib/nltk_data + +*4. Return to the main menu:* + +.. code-block:: shell + + --------------------------------------------------------------------------- + s) Show Config u) Set Server URL d) Set Data Dir m) Main Menu + --------------------------------------------------------------------------- + Config> m + + +*5. Download utilities:* + + punkt + Punkt Tokenizer Models + stopwords + Stopwords Corpus + + +.. code-block:: shell + + --------------------------------------------------------------------------- + d) Download l) List u) Update c) Config h) Help q) Quit + --------------------------------------------------------------------------- + Downloader> d + Download which package (l=list; x=cancel)? + Identifier> punkt + Downloading package punkt to /usr/local/lib/nltk_data... + Downloader> d + Download which package (l=list; x=cancel)? + Identifier> stopwords + Downloading package stopwords to /usr/local/lib/nltk_data... + + .. tip:: - On Debian GNU/Linux, you can choose any directory between '*~/nltk_data*' (where '~' is the homedir of user running - Pyramid application), '*/usr/share/nltk_data*', '*/usr/local/share/nltk_data*', '*/usr/lib/nltk_data*' and - '*/usr/local/lib/nltk_data*' - - -.. code-block:: pycon - - Config> m - --------------------------------------------------------------------------- - d) Download l) List u) Update c) Config h) Help q) Quit - --------------------------------------------------------------------------- - Downloader> d - - Download which package (l=list; x=cancel)? - Identifier> punkt - Downloading package punkt to /usr/local/lib/nltk_data... - - Downloader> d - - Download which package (l=list; x=cancel)? - Identifier> stopwords - Downloading package stopwords to /usr/local/lib/nltk_data... + The full list of NTLK Collection are displayable with the ``l) list`` option