Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linguisticsweb:tutorials:linguistics_tutorials:automaticannotation:stanford_pos_tagger_python [2020/09/28 19:46]
sabinebartsch created
linguisticsweb:tutorials:linguistics_tutorials:automaticannotation:stanford_pos_tagger_python [2020/10/01 12:23] (current)
Line 4: Line 4:
 [tutorial status: work in progress - January 2019] [tutorial status: work in progress - January 2019]
  
-Related tutorial: [[linguisticsweb:tutorials:linguistics_tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger]]+Related tutorial: [[linguisticsweb:tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger]]
  
-While we will often be running an annotation tool in a stand-alone fashion directly from the command line, there are many scenarios in which we would like to integrate an automatic annotation tool in a larger workflow, for example with the aim of running pre-processing and annotation steps as well as analyses in one go. In this tutorial, we will be running the [[linguisticsweb:tutorials:linguistics_tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger]] from a Python script.+While we will often be running an annotation tool in a stand-alone fashion directly from the command line, there are many scenarios in which we would like to integrate an automatic annotation tool in a larger workflow, for example with the aim of running pre-processing and annotation steps as well as analyses in one go. In this tutorial, we will be running the [[linguisticsweb:tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger]] from a Python script.
  
 The Stanford PoS Tagger is itself written in Java, so can be easily integrated in and called from Java programs. However, many linguists will rather want to stick with Python as their preferred programming language, especially when they are using other Python packages such as NLTK as part of their workflow. And while the Stanford PoS Tagger is not written in Python, it can nevertheless be more or less seamlessly integrated into Python programs. In this tutorial, we will be looking at two principal ways of driving the Stanford PoS Tagger from Python and show how this can be done with single files and with multiple files in a directory. The Stanford PoS Tagger is itself written in Java, so can be easily integrated in and called from Java programs. However, many linguists will rather want to stick with Python as their preferred programming language, especially when they are using other Python packages such as NLTK as part of their workflow. And while the Stanford PoS Tagger is not written in Python, it can nevertheless be more or less seamlessly integrated into Python programs. In this tutorial, we will be looking at two principal ways of driving the Stanford PoS Tagger from Python and show how this can be done with single files and with multiple files in a directory.
Line 67: Line 67:
 ===== Driving the Stanford PoS Tagger local installation from Python  / NLTK ====== ===== Driving the Stanford PoS Tagger local installation from Python  / NLTK ======
  
-Instead of running the Stanford PoS Tagger as an NLTK module, it can be driven through an NLTK wrapper module on the basis of a local tagger installation. In order to make use of this scenario, you first of all have to create a local installation of the Stanford PoS Tagger as described in the [[linguisticsweb:tutorials:linguistics_tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger tutorial]] under **2 Installation and requirements**.+Instead of running the Stanford PoS Tagger as an NLTK module, it can be driven through an NLTK wrapper module on the basis of a local tagger installation. In order to make use of this scenario, you first of all have to create a local installation of the Stanford PoS Tagger as described in the [[linguisticsweb:tutorials:automaticannotation:stanford_pos_tagger|Stanford PoS Tagger tutorial]] under **2 Installation and requirements**.
 In the code itself, you have to point Python to the location of your Java installation: In the code itself, you have to point Python to the location of your Java installation: