Skip to content

Commit

Permalink
Merge pull request #1920 from programminghistorian/issue-1883
Browse files Browse the repository at this point in the history
Add a warning to Introduction to Stylometry with Python (French and English); closes #1883
  • Loading branch information
fdlaramee committed Oct 30, 2020
2 parents 3144a0b + 8c5e75d commit 504e891
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions en/lessons/introduction-to-stylometry-with-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ At the end of this lesson, we will have examined the following topics:
* How to use relatively advanced data structures, including [dictionaries](https://en.wikipedia.org/wiki/Data_dictionary) of [strings](https://en.wikipedia.org/wiki/String_(computer_science)) and dictionaries of dictionaries, in [Python](https://en.wikipedia.org/wiki/Python_(programming_language)).
* The basics of the [Natural Languate Toolkit](https://www.nltk.org/) (NLTK), a popular Python module dedicated to [natural language processing](https://en.wikipedia.org/wiki/Natural-language_processing).

<div class="alert alert-warning">
Please note that the code in this lesson has been designed to run sequentially. Should you want to bypass Mendenhall's method, for example, and move straight to Kilgariff's or Burrows', please make sure to copy-paste the preprocessing code found in the description of Menenhall's characteristic curves into your own code block. Otherwise, you will not be able to match the results presented here.
</div>

## Prior Reading

If you do not have experience with the Python programming language or are finding examples in this tutorial difficult, the author recommends you read the lessons on [Working with Text Files in Python](/lessons/working-with-text-files) and [Manipulating Strings in Python](/lessons/manipulating-strings-in-python). Please note, that those lessons were written in Python version 2 whereas this one uses Python version 3. The differences in [syntax](https://en.wikipedia.org/wiki/Syntax) between the two versions of the language can be subtle. If you are confused at any time, follow the examples as written in this lesson and use the other lessons as background material. (More precisely, the code in this tutorial was written using [Python 3.6.4](https://www.python.org/downloads/release/python-364/); the [f-string construct](https://docs.python.org/3/whatsnew/3.6.html#pep-498-formatted-string-literals) in the line `with open(f'data/federalist_{filename}.txt') as f:`, for example, requires Python 3.6 or a more recent version of the language.)
Expand Down
4 changes: 4 additions & 0 deletions fr/lecons/introduction-a-la-stylometrie-avec-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ L'identification de l'auteur d'un texte anonyme constitue cependant l'une des ap
* Comment utiliser des structures de données relativement avancées, comme les [dictionnaires](https://fr.wikipedia.org/wiki/Dictionnaire_des_donn%C3%A9es) de [chaînes de caractères](https://fr.wikipedia.org/wiki/Cha%C3%AEne_de_caract%C3%A8res) et les dictionnaires de dictionnaires, dans le langage de programmation [Python](https://fr.wikipedia.org/wiki/Python_(langage)).
* Les rudiments du [Natural Language Toolkit (documentation en anglais)](https://www.nltk.org/) (nltk), un module Python populaire dédié au [traitement du langage naturel](https://fr.wikipedia.org/wiki/Traitement_automatique_du_langage_naturel).

<div class="alert alert-warning">
Veuillez noter que le code informatique de cette leçon a été conçu pour être exécuté en séquence. Si, par exemple, vous désirez passer outre la méthode de Mendenhall et vous diriger directement vers celle de Kilgariff ou celle de Burrows, veuillez vous assurer de copier-coller les instructions de pré-traitement qui apparaissent dans la description de la méthode de Mendenhall vers votre propre bloc de code. Sinon, vous n'obtiendrez pas exactement les résultats présentés ici.
</div>

## Lectures préalables

Si vous n'avez pas d'expérience de programmation en Python ou si vous trouvez les exemples dans ce tutoriel difficiles, l'auteur vous recommande de lire les leçons intitulées [Working with Text Files in Python](/en/lessons/working-with-text-files) et [Manipulating Strings in Python](/en/lessons/manipulating-strings-in-python); veuillez cependant noter que celles-ci ne sont disponibles qu'en anglais pour le moment. Notez aussi que ces leçons ont été rédigées en Python 2 tandis que ce tutoriel utilise Python 3. Les différences de [syntaxe](https://fr.wikipedia.org/wiki/Syntaxe) entre les deux versions du langage peuvent être subtiles. En cas de conflit, suivez les exemples tels qu'ils sont codés dans le présent tutoriel et n'utilisez les autres ressources qu'à titre indicatif. (Plus précisément, le code intégré à ce tutoriel a été écrit en [Python 3.6.4](https://www.python.org/downloads/release/python-364/); la chaîne de type [f-string](https://docs.python.org/3/whatsnew/3.6.html#pep-498-formatted-string-literals) qui apparaît dans la ligne `with open(f'data/federalist_{filename}.txt') as f:`, par exemple, requiert Python 3.6 ou une version plus récente du langage.)
Expand Down

0 comments on commit 504e891

Please sign in to comment.