Outils pour utilisateurs

Outils du site


tal_traitement_automatique_du_langage_avec_des_fables_de_la_fontaine

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tal_traitement_automatique_du_langage_avec_des_fables_de_la_fontaine [2020/06/07 10:37] – [python recherche à faire] sergetal_traitement_automatique_du_langage_avec_des_fables_de_la_fontaine [2022/02/08 15:59] (Version actuelle) – Tag0 Removed: text_gen serge
Ligne 8: Ligne 8:
 <WRAP center round box 80% centeralign> <WRAP center round box 80% centeralign>
 **Cette page est la suite de [[Text Processing and Machine Learning TAL]]** **Cette page est la suite de [[Text Processing and Machine Learning TAL]]**
 +</WRAP>
 +
 +<WRAP center round box 80% centeralign>
 +**La page suivante est  [[archives:textgenrnn|Générer du texte en python avec textgenrnn]]**
 </WRAP> </WRAP>
  
Ligne 98: Ligne 102:
 ===== Plongement de mots - word embedding ===== ===== Plongement de mots - word embedding =====
 ====Wikipedia==== ====Wikipedia====
-  * Le **[[https://fr.wikipedia.org/wiki/Word_embedding|word embeddin]]** (« plongement de mots1 » ou « plongement lexical2 » en français) est une méthode d'apprentissage d'une représentation de mots utilisée notamment en traitement automatique des langues.+  * Le **[[https://fr.wikipedia.org/wiki/Word_embedding|word embedding]]** (« plongement de mots1 » ou « plongement lexical2 » en français) est une méthode d'apprentissage d'une représentation de mots utilisée notamment en traitement automatique des langues.
  
 Cette technique permet de représenter chaque mot d'un dictionnaire par un vecteur de nombres réels. Cette technique permet de représenter chaque mot d'un dictionnaire par un vecteur de nombres réels.
Ligne 109: Ligne 113:
 ====Gensim==== ====Gensim====
   * Voir **[[https://radimrehurek.com/gensim/auto_examples/|Gensim Documentation]]**   * Voir **[[https://radimrehurek.com/gensim/auto_examples/|Gensim Documentation]]**
 +
  
 ===== Réseaux de neurones ===== ===== Réseaux de neurones =====
-**Et composer des textes en vers comme La Fontaine !** +  * **[[archives:textgenrnn|Et composer des textes en vers comme La Fontaine avec textgenrnn]]**
-====char-rnn==== +
-  * **[[https://github.com/karpathy/char-rnn|github.com/karpathy/char-rnn]]** Multi-layer Recurrent Neural Network for training/sampling from character-level language models. Mais c'est du LUA, on "pass"+
  
-==== textgenrnn ==== 
-<code> 
-sudo pip3 install textgenrnn 
-sudo pip3 install tensorflow>=2.1.0 
-sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl 
-sudo python3.7 -m pip install --upgrade pip 
-sudo python3.7 pip install --upgrade pip 
-sudo python3.7 pip3 install --upgrade pip3 
-sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl 
-sudo pip3 install textgenrnn 
-</code> 
  
-<code> +{{tagapprentissage_automatique python tal }} 
-serge@127:~$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl +
-Collecting tensorflow-cpu==2.1.0 +
-  Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl (104.6 MB) +
-     |████████████████████████████████| 104.6 MB 453 kB/s  +
-Collecting tensorboard<2.2.0,>=2.1.0 +
-  Downloading tensorboard-2.1.1-py3-none-any.whl (3.8 MB) +
-     |████████████████████████████████| 3.8 MB 387 kB/s  +
-Requirement already satisfied, skipping upgrade: grpcio>=1.8.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow-cpu==2.1.0) (1.19.0) +
-Requirement already satisfied, skipping upgrade: six>=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow-cpu==2.1.0) (1.12.0) +
-Collecting numpy<2.0,>=1.16.0 +
-  Downloading numpy-1.18.5-cp37-cp37m-manylinux1_x86_64.whl (20.1 MB) +
-     |████████████████████████████████| 20.1 MB 458 kB/s  +
-Collecting google-pasta>=0.1.6 +
-  Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB) +
-     |████████████████████████████████| 57 kB 448 kB/s  +
-Collecting tensorflow-estimator<2.2.0,>=2.1.0rc0 +
-  Downloading tensorflow_estimator-2.1.0-py2.py3-none-any.whl (448 kB) +
-     |████████████████████████████████| 448 kB 397 kB/s  +
-Requirement already satisfied, skipping upgrade: absl-py>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-cpu==2.1.0) (0.7.0) +
-Requirement already satisfied, skipping upgrade: astor>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-cpu==2.1.0) (0.7.1) +
-Requirement already satisfied, skipping upgrade: gast==0.2.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow-cpu==2.1.0) (0.2.2) +
-Collecting protobuf>=3.8.0 +
-  Downloading protobuf-3.12.2-cp37-cp37m-manylinux1_x86_64.whl (1.3 MB) +
-     |████████████████████████████████| 1.3 MB 459 kB/s  +
-Collecting keras-applications>=1.0.8 +
-  Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB) +
-     |████████████████████████████████| 50 kB 429 kB/s  +
-Collecting opt-einsum>=2.3.2 +
-  Downloading opt_einsum-3.2.1-py3-none-any.whl (63 kB) +
-     |████████████████████████████████| 63 kB 413 kB/s  +
-Requirement already satisfied, skipping upgrade: termcolor>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-cpu==2.1.0) (1.1.0) +
-Collecting keras-preprocessing>=1.1.0 +
-  Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB) +
-     |████████████████████████████████| 42 kB 391 kB/s  +
-Requirement already satisfied, skipping upgrade: wheel>=0.26; python_version >= "3" in /usr/lib/python3/dist-packages (from tensorflow-cpu==2.1.0) (0.32.3) +
-Collecting scipy==1.4.1; python_version >= "3" +
-  Downloading scipy-1.4.1-cp37-cp37m-manylinux1_x86_64.whl (26.1 MB) +
-     |████████████████████████████████| 26.1 MB 154 kB/s  +
-Collecting wrapt>=1.11.1 +
-  Downloading wrapt-1.12.1.tar.gz (27 kB) +
-Requirement already satisfied, skipping upgrade: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.2.0,>=2.1.0->tensorflow-cpu==2.1.0) (3.0.1) +
-Requirement already satisfied, skipping upgrade: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard<2.2.0,>=2.1.0->tensorflow-cpu==2.1.0) (2.21.0) +
-Collecting google-auth<2,>=1.6.3 +
-  Downloading google_auth-1.16.1-py2.py3-none-any.whl (90 kB) +
-     |████████████████████████████████| 90 kB 409 kB/s  +
-Collecting setuptools>=41.0.0 +
-  Downloading setuptools-47.1.1-py3-none-any.whl (583 kB) +
-     |████████████████████████████████| 583 kB 404 kB/s  +
-Requirement already satisfied, skipping upgrade: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.2.0,>=2.1.0->tensorflow-cpu==2.1.0) (0.14.1) +
-Collecting google-auth-oauthlib<0.5,>=0.4.1 +
-  Downloading google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB) +
-Requirement already satisfied, skipping upgrade: h5py in /usr/local/lib/python3.7/dist-packages (from keras-applications>=1.0.8->tensorflow-cpu==2.1.0) (2.9.0) +
-Collecting cachetools<5.0,>=2.0.0 +
-  Downloading cachetools-4.1.0-py3-none-any.whl (10 kB) +
-Requirement already satisfied, skipping upgrade: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.2.0,>=2.1.0->tensorflow-cpu==2.1.0) (0.2.8) +
-Collecting rsa<4.1,>=3.1.4 +
-  Downloading rsa-4.0-py2.py3-none-any.whl (38 kB) +
-Collecting requests-oauthlib>=0.7.0 +
-  Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB) +
-Requirement already satisfied, skipping upgrade: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<2.2.0,>=2.1.0->tensorflow-cpu==2.1.0) (0.4.8) +
-Collecting oauthlib>=3.0.0 +
-  Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB) +
-     |████████████████████████████████| 147 kB 398 kB/s  +
-Building wheels for collected packages: wrapt +
-  Building wheel for wrapt (setup.py) ... done +
-  Created wheel for wrapt: filename=wrapt-1.12.1-cp37-cp37m-linux_x86_64.whl size=73410 sha256=c47ac3ed15850409bf1e0525a4b18567bf925f7f7671e772725aef6292745322 +
-  Stored in directory: /root/.cache/pip/wheels/62/76/4c/aa25851149f3f6d9785f6c869387ad82b3fd37582fa8147ac6 +
-Successfully built wrapt +
-ERROR: matplotlib 3.0.2 requires kiwisolver>=1.0.1, which is not installed. +
-ERROR: imgaug 0.2.8 requires opencv-python, which is not installed. +
-ERROR: tensorflow 1.13.1 has requirement tensorboard<1.14.0,>=1.13.0, but you'll have tensorboard 2.1.1 which is incompatible. +
-ERROR: tensorflow 1.13.1 has requirement tensorflow-estimator<1.14.0rc0,>=1.13.0, but you'll have tensorflow-estimator 2.1.0 which is incompatible. +
-ERROR: tensorboard 2.1.1 has requirement grpcio>=1.24.3, but you'll have grpcio 1.19.0 which is incompatible. +
-ERROR: scikit-image 0.14.2 has requirement pillow>=4.3.0, but you'll have pillow 3.2.0 which is incompatible. +
-Installing collected packages: numpy, setuptools, protobuf, cachetools, rsa, google-auth, oauthlib, requests-oauthlib, google-auth-oauthlib, tensorboard, google-pasta, tensorflow-estimator, keras-applications, opt-einsum, keras-preprocessing, scipy, wrapt, tensorflow-cpu +
-  Attempting uninstall: numpy +
-    Found existing installation: numpy 1.15.4 +
-    Uninstalling numpy-1.15.4: +
-      Successfully uninstalled numpy-1.15.4 +
-  Attempting uninstall: setuptools +
-    Found existing installation: setuptools 40.8.0 +
-    Uninstalling setuptools-40.8.0: +
-      Successfully uninstalled setuptools-40.8.0 +
-  Attempting uninstall: protobuf +
-    Found existing installation: protobuf 3.7.0 +
-    Uninstalling protobuf-3.7.0: +
-      Successfully uninstalled protobuf-3.7.0 +
-  Attempting uninstall: tensorboard +
-    Found existing installation: tensorboard 1.13.0 +
-    Uninstalling tensorboard-1.13.0: +
-      Successfully uninstalled tensorboard-1.13.0 +
-  Attempting uninstall: tensorflow-estimator +
-    Found existing installation: tensorflow-estimator 1.13.0 +
-    Uninstalling tensorflow-estimator-1.13.0: +
-      Successfully uninstalled tensorflow-estimator-1.13.0 +
-  Attempting uninstall: keras-applications +
-    Found existing installation: Keras-Applications 1.0.7 +
-    Uninstalling Keras-Applications-1.0.7: +
-      Successfully uninstalled Keras-Applications-1.0.7 +
-  Attempting uninstall: keras-preprocessing +
-    Found existing installation: Keras-Preprocessing 1.0.9 +
-    Uninstalling Keras-Preprocessing-1.0.9: +
-      Successfully uninstalled Keras-Preprocessing-1.0.9 +
-  Attempting uninstall: scipy +
-    Found existing installation: scipy 1.2.1 +
-    Uninstalling scipy-1.2.1: +
-      Successfully uninstalled scipy-1.2.1 +
-  Attempting uninstall: wrapt +
-    Found existing installation: wrapt 1.10.11 +
-ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. +
-</code> +
-<code> +
-sudo pip3 install textgenrnn +
-[sudo] Mot de passe de serge :  +
-Collecting textgenrnn +
-  Using cached textgenrnn-2.0.0.tar.gz (1.7 MB) +
-Requirement already satisfied: h5py in /usr/local/lib/python3.7/dist-packages (from textgenrnn) (2.9.0) +
-Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from textgenrnn) (0.21.2) +
-Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from textgenrnn) (4.43.0) +
-Requirement already satisfied: keras in /usr/local/lib/python3.7/dist-packages (from textgenrnn) (2.2.4) +
-Collecting tensorflow>=2.1.0 +
-  Downloading tensorflow-2.2.0-cp37-cp37m-manylinux2010_x86_64.whl (516.2 MB) +
-     |████████████████████████████████| 516.2 MB 5.4 kB/s  +
-Requirement already satisfied: six in /usr/lib/python3/dist-packages (from h5py->textgenrnn) (1.12.0) +
-Requirement already satisfied: numpy>=1.7 in /usr/local/lib/python3.7/dist-packages (from h5py->textgenrnn) (1.18.5) +
-Requirement already satisfied: scipy>=0.17.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->textgenrnn) (1.4.1) +
-Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->textgenrnn) (0.13.2) +
-Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.7/dist-packages (from keras->textgenrnn) (1.1.2) +
-Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from keras->textgenrnn) (3.13) +
-Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python3.7/dist-packages (from keras->textgenrnn) (1.0.8) +
-Collecting astunparse==1.6.3 +
-  Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB) +
-Processing /root/.cache/pip/wheels/62/76/4c/aa25851149f3f6d9785f6c869387ad82b3fd37582fa8147ac6/wrapt-1.12.1-cp37-cp37m-linux_x86_64.whl +
-Collecting tensorboard<2.3.0,>=2.2.0 +
-  Downloading tensorboard-2.2.2-py3-none-any.whl (3.0 MB) +
-     |████████████████████████████████| 3.0 MB 390 kB/s  +
-Requirement already satisfied: google-pasta>=0.1.8 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (0.2.0) +
-Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (3.2.1) +
-Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (1.19.0) +
-Requirement already satisfied: protobuf>=3.8.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (3.12.2) +
-Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (1.1.0) +
-Requirement already satisfied: wheel>=0.26; python_version >= "3" in /usr/lib/python3/dist-packages (from tensorflow>=2.1.0->textgenrnn) (0.32.3) +
-Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.1.0->textgenrnn) (0.7.0) +
-Collecting tensorflow-estimator<2.3.0,>=2.2.0 +
-  Downloading tensorflow_estimator-2.2.0-py2.py3-none-any.whl (454 kB) +
-     |████████████████████████████████| 454 kB 431 kB/s  +
-Collecting gast==0.3.3 +
-  Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB) +
-Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (47.1.1) +
-Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (1.16.1) +
-Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (2.21.0) +
-Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (0.14.1) +
-Collecting tensorboard-plugin-wit>=1.6.0 +
-  Downloading tensorboard_plugin_wit-1.6.0.post3-py3-none-any.whl (777 kB) +
-     |████████████████████████████████| 777 kB 400 kB/s  +
-Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (0.4.1) +
-Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (3.0.1) +
-Requirement already satisfied: rsa<4.1,>=3.1.4 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (4.0) +
-Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (4.1.0) +
-Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (0.2.8) +
-Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (1.3.0) +
-Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.7/dist-packages (from rsa<4.1,>=3.1.4->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (0.4.8) +
-Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow>=2.1.0->textgenrnn) (3.1.0) +
-Building wheels for collected packages: textgenrnn +
-  Building wheel for textgenrnn (setup.py) ... done +
-  Created wheel for textgenrnn: filename=textgenrnn-2.0.0-py3-none-any.whl size=1733680 sha256=078fd7abe022e787c8abeebf39c0af45e019d411fe295882573d1f320662378f +
-  Stored in directory: /root/.cache/pip/wheels/8a/df/6c/327949b0ebdf6eac64ead76d9a15cfd392565aa8321e5877c4 +
-Successfully built textgenrnn +
-ERROR: tensorflow 2.2.0 has requirement h5py<2.11.0,>=2.10.0, but you'll have h5py 2.9.0 which is incompatible. +
-ERROR: tensorboard 2.2.2 has requirement grpcio>=1.24.3, but you'll have grpcio 1.19.0 which is incompatible. +
-Installing collected packages: astunparse, wrapt, tensorboard-plugin-wit, tensorboard, tensorflow-estimator, gast, tensorflow, textgenrnn +
-  Attempting uninstall: wrapt +
-    Found existing installation: wrapt 1.10.11 +
-ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. +
-</code> +
-=== fin ===+
  
-{{tag>tal text_processing machine_learning apprentissage_automatique python python3 nltk}} 
tal_traitement_automatique_du_langage_avec_des_fables_de_la_fontaine.1591526269.txt.gz · Dernière modification : 2020/06/07 10:37 de serge