Aiton English

Learning Languages for Life

Category: Programming

Python for linguists: beginner course + NLTK

If you’re interested in analysing how words are used in different contexts, or which words are more popular than others, analysing corporas, or just want to process people’s twitter / social media accounts to see who /what they’re positive about and what they don’t like so much, then python language programming can help.

And it’s easier than you think .

you can either search the internet for advice  / videos on

“how to use python to….”

and generally end up watching some videos to learn. Just two points:

1 – make sure you actually do yourself on your computer what you see in the video  (or read)

2 – as you “do” on your computer, play with what you’re doing, change it, experiment, have fun.

for learning about analysing language use, you can do the above, or follow the outline given below..

 

About the outline below, when followng it I recommend flexibility, i.e.

  • skip stuff that’s boring
  • look up more videos / articles for stuff that is difficult / more interesting
  • skip stuff that is still difficult after the previous advice
  • don’t be afraid at any moment to brach out into doing other things in python. THe stuff you learn will help with Natural Language Processing
  • definitely watch videos of stuff with python for doing anything so you raise your awareness of capabilities (in tihs case it miught be a good idea not to worry about actually doing what you see, just watch and pick pu general ideas even if you’re not sure about everything that is going on)
  • do stuff regularly, in smaller chunks
  • play and tweak…

 

 

Step 1: (if you’re new to python)

learn the basics of python.: good place to start is this free online course

NOTE: if you EVER have a problem, and the program tells you something is wrong, copy the message the program gives you, put it into a search engine, and you will find links to a GREAT tutoring forum

https://stackoverflow.com/

 

Step 2: NLTK  – Natural Language Toolkit

look into NLTK, a toolkit that helps analyse language:

a – watch videos 3,4,5,6 (click here)

NOTE: the book for NLTK is available online for free. Before, during or as you do step 2 a, you may like to read the first three chapters of the book (here)

b – then watch the series here  (ignore the fact that the guy is working from the “black and white” command line, you can do the same things in a Python IDLE)

c-  Do the course here (skipping stuff covered in the previous course)

At all times, any time you hav a question, pop it into a search engine to learn. There’s a lot of help for programming out there

 

after that look into regular expressions with python, scraping, plotting and other great stuff!!!

 

 

 

 

 

 

 

 

 

 

HTML Case Study: Adjusting a table / youtube video size

 

a – Familiarize yourself with the IELTS “fluency and coherence” criteria here if you haven’t done so

b – THe table below shows how 9 and 8 are different for the criteria “fluency and coherence”. I have divided the IELTS speaking criteria for “fluency and coherence” into the 4 aspects that the criteria focus on. Look at the table below and familiarize yourself with the differences between 8/9. (you’ll notice that for one of them the criteria do not mention anything for 8, this is IELTS, not me)

 
<table style=”height: 409px;” width=”300″ cellspacing=”0″ cellpadding=”4″><colgroup> <col width=”10*” /> <col width=”246*” /> </colgroup>
<tbody>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”>
<h3 lang=”en-US” align=”center”><b>  Repetition / Self-correction </b></h3>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>9</h3>
</td>
<td width=”96%”>
<p lang=”en-US”><span style=”text-decoration: underline;”><strong> Only rare </strong></span>repetition /self-correction</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>8</h3>
</td>
<td width=”96%”>
<p lang=”en-US”><span style=”text-decoration: underline;”><strong>Only </strong></span><b><span style=”text-decoration: underline;”>occasi</span></b><strong><span style=”text-decoration: underline;”>ona</span><span style=”text-decoration: underline;”>l</span> </strong>repetition / self-correction</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”></td>
</tr>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”>
<h3 lang=”en-US” align=”center”><b>Pauses / Hesitation</b></h3>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>9</h3>
</td>
<td width=”96%”>
<p lang=”en-US”>Pauses <b>only</b> to find ideas and <b>not</b> to search for language (words / grammar)</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>8</h3>
</td>
<td width=”96%”>
<p lang=”en-US”>Pauses are <span style=”text-decoration: underline;”>usually </span>for ideas and <span style=”text-decoration: underline;”>only rarely t</span>o search for language</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”></td>
</tr>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”>
<h3 lang=”en-US” align=”center”><b>Cohesive devices / linking expressions</b></h3>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>9</h3>
</td>
<td width=”96%”>
<p lang=”en-US”><span style=”text-decoration: underline;”><strong>Fully</strong> </span>appropriate cohesive devices</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>8</h3>
</td>
<td width=”96%”>
<p lang=”en-US”>-</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”></td>
<td width=”96%”>
<h3 lang=”en-US” align=”center”><b>Topic Development</b></h3>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>9</h3>
</td>
<td width=”96%”>
<p lang=”en-US”>Devlops topics <span style=”text-decoration: underline;”><strong>fully</strong> </span>and appropriately</p>
</td>
</tr>
<tr valign=”top”>
<td width=”4%”>
<h3 lang=”en-US”>8</h3>
</td>
<td width=”96%”>
<p lang=”en-US”>Develops topics coherently and appropriately</p>
</td>
</tr>
</tbody>
</table>
&nbsp;

c- Watch the video below from the official IELTS channel and see if you agree that the candidate is an 8 for Fluency and Coherence and not a 9…
<iframe src=”https://www.youtube.com/embed/92d5mIK0bPM” width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>

&nbsp;

&nbsp;

&nbsp;

&nbsp;

© 2017 Aiton English

Theme by Anders NorenUp ↑