Skip to content

Commit 504e891

Browse files
authored
Merge pull request #1920 from programminghistorian/issue-1883
Add a warning to Introduction to Stylometry with Python (French and English); closes #1883
2 parents 3144a0b + 8c5e75d commit 504e891

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

en/lessons/introduction-to-stylometry-with-python.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ At the end of this lesson, we will have examined the following topics:
4747
* 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)).
4848
* 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).
4949

50+
<div class="alert alert-warning">
51+
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.
52+
</div>
53+
5054
## Prior Reading
5155

5256
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.)

fr/lecons/introduction-a-la-stylometrie-avec-python.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ L'identification de l'auteur d'un texte anonyme constitue cependant l'une des ap
5252
* 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)).
5353
* 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).
5454

55+
<div class="alert alert-warning">
56+
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.
57+
</div>
58+
5559
## Lectures préalables
5660

5761
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.)

0 commit comments

Comments
 (0)