Text Analysis with AntConc for social media data: Concordancer and Concordance Plot

In the lasts posts, we learn the basics about AntConc and how to generate and analyze word lists. Now we are going to show you how to use AntConc to study concordances through allowing the navigation of instances of a keywords in context.

Don’t forget that this post is part of a series of tutorials:

  1. Intro, Opening a File and Settings
  2. Word Lists and File Viewer 
  3. Concordancer and Concordance Plot (we are here)
  4. Clusters and N-Grams (soon)
  5. Collocations (soon)


Concordance basics

1. Open your file(s). In that example, we are going to use a simple example of only two texts: the english webpages about the countries United States and United Kingdom. You can find them at our datasets folder.


2. Generate a Word List.


3. Click on the Concordance tab. Now you can search for a letter, word or expression. We searched for the term ‘war’ and, as you can see, we got a total of 107 Concordance Hits. This is the sum of the total amount of results to that specific search in the two files.


4. By default, the search term will be highlighted in blue and up to three terms on the right will be highlighted in red, green and purple. You can change those colors in Global Settings.

They are useful to understand and sort the words in the vicinity of our term (or terms) of interest.


5. At the bottom, you can change the Kwic (Keyword-in-context) settings and choose which items you want to highlight and sort in the Concordance tab. You can select up to three levels. In the following images, 1R stands for “1 Right, or first item on the right”, 1L stands for “1 Left, or first item on the left” and so on.


Changing the levels to 1L, 2L and 3L will result on something like the following:


World War


as * as


Concordance plot

The concordance plot is a straightforward way to compare two or more corpora, their concordance hits and the distribution of words or phrases along them.

1. It is very simple to use the Concordance Plot. Just generate a Word List (if you haven’t already), search for a word or phrase on the Concordance tab and click on the Concordance Plot tab. Let’s use that same example from before, searching for ‘war’:


2. As we can see, the word ‘war’ is much more common on the United States WIkipedia page. What does that mean? It could be a indication of more interest on war between the editors of the USA wikipedia page, for example?


3. You can increase the zoom on the visualization in the option Plot Zoom:


4. You can observe in Step 2 that besides the number the fact that the characters in each file are different (126k x 135k), the rectangle representing the files has the same width. This is because the visualization is normalized to facilitate some comparisons. You can change that going in Tool Preferences -> Concordance Plot and selecting the option “Use a relative lenght” in the Plot Length Options.

Now you can see a width that better represents the length and the difference between the files:


Searching for a list of words

1. At the Concordance tool, as well in other AntConc tools, we can search for a list of words at once. Those words could be inserted manually or through a txt file.


2. In the Advanced Search options you can check the option “Use search term(s) from list below” and input the words. In the following example, we used the expressions below to include also terms like “economics”, “economically”, “finance”,  “financial” etc.


3. Alternatively, you can click on “Load File” and upload words from a .txt file.


4. With this technique you can look and explore concordances for words with semantic similarity:


5. Finally, another option on the Advanced Search specifications is to use Context Words and Horizons. The terms searched are filtered out according to proximity to other words. In the example below, the combination of terms related to war and conflicts to a filter of instances next to ‘crisis’ and ‘depression’ could be used for understanding the relations between war and economic problems:



Text Analysis with AntConc for social media data: Word Lists, Word Frequencies and File View

In the last post, we learn the basics about AntConc. Now we are going to show you how to use AntConc to generate word lists (and frequencies) and the useful File Viewer.

Don’t forget that this post is part of a series of tutorials:

  1. Intro, Opening a File and Settings
  2. Word Lists and File Viewer (we are here)
  3. Concordancer and Concordance Plot
  4. Clusters and N-Grams (soon)
  5. Collocations (soon)


AntConc functions are accessed through the seven tabs below:

In that basic tutorial, we are going to follow the steps to produce simple word lists.

Remember to open your file and import the recommended settings for social media research [tutorial].

Generating and navigating in a simple Word List

  1. Open your file(s). In the examples below I’m going to use a dataset with 16k tweets in english containing the word ‘brazil’ (collected through Netlytic). Download the file brazil_tweets_16732tweets_2017_11_30.txt in our folder.


2. In the Word List tab, click on Start and wait a few seconds 

3. Now you can explore and navigate the data, scrolling down to find meaningful words, sort by Frequency, Word (alphabetical order) or Word end.

4. You can search for a term on the box at the bottom and click on the button “Search Only”:


5. If you click on any word, you’ll be directed to the Concordance tab. You can also read a tutorial on the Concordance tool (soon)


6. And if you click in any word on the Concordance tool, you’ll be directed to the File View tool. It functions like a simple text reader, where you can see the full corpora.


7. To export the list, just go back to the Word List tab and click on File -> Save Output.


8. The output is a .txt file that looks like this:

9. Then you can open or copy-paste the output in a spreadsheet software like Excel or Libreoffice to further analyses.



Filtering out stopwords

Stopwords are words that you don’t want to count or visualize. Usually, they are the most common words without semantic or topical relevance for your research problem (such as articles, pronouns and some adverbs).


  1. First, you need a stopword list! You can produce or edit a list yourself, but let’s start with an example list. You can download it on the lists folder.


2. To upload a stopwords lists from a .txt file, go to Tool Preferences -> Word List. There you’ll see the option “Use a stoplist below” in the “Word List Range” section. Click on Open and select your .txt file.


If you have done it right, the words will show in the box:


Now you just click on “Apply”!

  1. Go back to the Word List tab and click again the button “Start”. Compare the two word lists below. The first one was the original word list and the second one is the list with stopwords filtered out:



Counting specific words

Other useful Word List option is to count only specific words that you already know or that you just discovered in your corpora/datasets. Follow the steps below:

1. Firstly, you’ll need a word list. In our case, we are going to upload a list of words of brazilian soccer teams like that below:


2. Go to Tool Preferences -> Word Lists and open the Words from the file (download it in the lists folder). Click on “Use specific words below” and Apply.


3. Go to the Word List tab and click on ‘Start’ to generate the list again. The result will be a list of only the desired words:


4. Exporting that list (through File -> Save Output) and you can produce a Treemap like that visualization below with RAW Graphs:



Counting Lemma Word Forms

This is a optional step, if you want to aggregate the inflected forms of a word. For example, the verb talk may appear as talking, talks, talking and so on. Lemmatization aggregates those inflected forms to talk.

On social media data, this is important to investigate variations of a same root meaning, such as autism, autistic, “autist” related to a search query for vaccines for example.



  1. In AntConc, the first thing you’ll need is a lemma list. You can download it directly from the AntConc website or in our wordlists folder. The file will look like this:


That means you can add or remove lines of lemma correspondences. As you can see above, that list doesn’t include the word autism. We could add the following line:

autism -> autistic, autistically, autist

(even though the word ‘autist’ doesn’t exists, it could be added because it is a common error between portuguese speakers, for example)


2. To add a Lemma List you just need go to Tool Preferences -> Word List and click Load on Lemma List options.


After you selected your file, AntConc will show you a preview. Click in “OK” and then “Apply”:


3. Now you can go back to the Word List tab and generate your list again. As you can see below, now AntConc counts Lemma Types and Lemma Tokens instead of Word Types and Word Tokens:

Lemmatization can greatly improve the preciseness of some claims about your corpora.

We hope Word lists, Word Frequencies, Filtering Stop Words and Lemmatization techniques will help you to explore and analyze your social media datasets.


The next AntConc tutorial will focus on Concordancer and Concordance Plot (soon)!

Text Analysis with AntConc for social media data: intro, files and settings

Broadly defined, (computational) text analysis is a set of techniques for automated content analysis. Even without the use of complex statistics or computational analysis, social science researchers can improve their data exploration with techniques involving word counting, co-occurrence and collocations.

AntConc is one of the most easy-to-use and useful tools for text analysis and corpus linguistics. It was developed by Laurence Anthony, Professor in the Faculty of Science and Engineering at Waseda University, Japan. He maintains dozens of tools in his website like TagAnt and FireAnt.

After this intro on AntConc, we are going to see the following posts covering its main functionalities:

  1. Intro, Opening a File and Settings (we are here)
  2. Word Lists and File Viewer
  3. Concordancer and Concordance Plot
  4. Clusters and N-Grams (soon)
  5. Collocations (soon)


The following matrix was proposed in the paper Computational text analysis for social science: Model assumptions and complexity and summarizes the possibilities between simple statistics/computation x complex statistics/computation and between weaker and stronger domain assumption. Using Antconc for analyze social media textual data encompasses simple statistics/computation tasks such as word counting and statistics, but can be further applied on dictionary-based word counting by topic experts.

To understand and compare approaches from computer-aided content analysis, computer-aided interpretive textual analysis and corpus linguistics, I recommend the paper Taming textual data: The contribution of corpus linguistics to computer-aided text analysis.

AntConc will allow you to perform the main techniques of corpus linguistics such as Word Frequencies, Collocation, Concordance, N-Grams, Corpora Comparison to any kind of text.

But first things first! Download AntConc and read the following text, which will teach you the basics about the settings and how to open a file.


How to collect social media textual data?

There are dozens of social media research tools which allow to extract or monitor textual data on the main platforms. Most of them collect data through keyword/hashtag search and/or from specific pages and websites. The majority of the following tools uses UTF-8 encoding to export files in .csv format. You can open them with Excel or Libreoffice and copy-paste the desired texts to a notepad and save it as a .txt file.

Repositories/curated lists of tools:

If you are entirely new to analyzing social media textual data, I strongly recommend you to try the awesome and user-friendly tool Netlytic and collect some tweets or youtube comments. But don’t worry: I’m going to give you some datasets in the following posts.


File Formats

AntConc can read several text formats: .txt, .html, .xml, .ant. The simpler one is the .txt file.

File Format Description
.txt .TXT is the simpler format to store text files. Softwares like Notepad, Notepad++, TextMate, Word and most of the word editing softwares can save your files as .txt.
.html .HTML is the standard format for saving web pages. You can save a webpage and upload it to AntConc.

AntConc has some settings to ignore text between the characters “< and “> used on HTML files.

.xml .XML files: Extensible Markup Language. It is similar to .HTML document, but uses custom tags to define objects and the data within each object. In corpus linguistics/text analysis, it is frequently used to mark each word with word categories in Part-of-Speech Tagging.
.ant .ANT is a file format used by AntConc, interchangeable with txt. It only saves the data on the current screen as an output.


  1. Encoding

It is recommended that you save your text files with UTF-8 encoding. A character encoding is a standard on how to process characters and symbols. UTF-8 is defined by the Unicode Standard, which englobes characters used in most Western languages and scripts. Due to that, several data collection tools use UTF-8 encoding as a standard. So, remember to save your files in UTF-8 encoding!


Optimal Settings for Social Media Texts

  1. Pre-configured settings

AntConc was not developed just for social media data but, instead, to analyse all sorts of texts, mainly literature, natural language and language corpora. It requires some adjustments on the software settings.

The specifications are listed below, but instead of following each step, you could just import a Settings File with the recommended definitions. Download the file antconc_settings_for_social_media.ant and, on AntConc, go to File -> Import Settings from File…, select and open the file:


That’s it! Now AntConc can be more useful for social media analysis. You can skip the following settings description if you have already imported the file.


2. Global Settings – Token Definition

In this section, we explain the recommended settings. Remember: you don’t need to follow these steps if you have just uploaded the pre-configured settings file provided above.

Firstly, we configured the token settings. A token is an element (word, character, punctuation, symbol, etc). In the Token Definition Settings, you can define which characters/symbols AntConc will consider when counting and processing your text data.

The default ettings are the following:


But, when we are working with social media data, there are some special characters used by social media users which represent specific conversation and affiliation practices. Two of them are very important:

The ‘@’ symbol: for Twitter users, the [at] symbol is used to mark user profiles. So, it is important to append the ‘@’ symbol. This will allow us, for example, to count the most mentioned Twitter’s users or the opposite: to filter out the usernames.

The ‘#’ symbol, in its turn, is a type of metadata used on most social media platforms to define hashtags. You need to append ‘#’ in AntConc token definitions to properly count hashtags.


So, we just need to go to Global Settings -> Token Definition, check the box “Append Following Definition” and include the signs ‘#’ and ‘@’.

3. Wildcard definitions

A WildCard is a character that can be substituted by a character, word or symbol during a query. AntConc has seven different wildcards. Below we can see the default settings (Global Settings -> Wildcards).

The problem is that two of these wildcards are attributed to very important signs on social media data: ‘#’ and ‘@’. This result means that AntConc “ignores” these two signs in the results, because they are reserved as wildcards.

So, we recommend to change these two wildcard to other signs. In the example below, we changed them for ‘{ and ‘} .



Opening your File or Corpora

  1. Opening your File(s)

To open a file or a set of files in AntConc you just need to go to File -> Open File(s)… or File -> Open Dir.

With the option File -> Open File(s) you can select one or more files.

If you open two or more files, AntConc will apply your queries and analyses on all of them at once.

This is very useful for managing datasets/corpora. For example: you could be analysing a year of data and save the texts (comments, posts, tweets) for each month in a different file. Open the 12 files at once allows you to compare things like: countings of specific words in the Concordance Plot; or Range of presence of clusters/n-grams.


Now we can talk about counting word frequencies. See you next post: Word Lists, Word Frequencies and File View

Discurso no Twitter e Mídias Sociais: como usamos linguagem para criar afiliação na web

discourse and social media

O livro “Discourse of Twitter and Social Media: How We Use Language to Create Affiliation on the Web” foi lançado em 2012 pela professora Michelle Zappavigna, da University of South Wales (Austrália). A discussão e análise teórico-analítica se debruçou em um corpus, chamado de HERMES, criado pela pesquisadora com cerca de 7 milhões de tweets e de 100 milhões de palavras.

É um excelente exemplo da aplicação da linguística de corpus para a análise de mídias sociais, discurso, práticas interacionais, afetivas e políticas. Ao longo de seus capítulos, a autora aplica técnicas como análise de colocações, n-gram e contagem de frequências para identificar padrões e desvios nos textos do Twitter.

O primeiro capítulo, Social Media as Corpora, discute a possibilidade de entender as mídias sociais, e a sociedade através delas, a partir da construção de corpora de conteúdos textuais gerados em tempo real no Twitter. Parte do princípio de que as mídias sociais permitiram, sobretudo, a emergência da possibilidade de “discurso buscável” (searchable talk), com impactos relevantes na sociabilidade. Qualquer pessoa que já utilizou uma hashtag para marcar uma posição política ou para falar de um programa televiso, sabe muito bem do que a autora está falando:

“searchable talk, a change in social relations whereby we mark our discourse so that it can be found by others, in effect so that we can bond around particular values”

Zappavigna utiliza a SFL (systemic functional linguistics), que direciona a análise para uma abordagem funcional de análise utilizando metodologias de linguística de corpus. A partir da base antropológica, sobretudo de Malinowski, vê a linguagem como recurso para a realização de três funções: função ideacional de determinação de experiência, função interpesssoal de negociação de relações e função de textual de organização da informação.

Deste modo, no segundo capítulo, The Language of Microblogging, descreve as particularidades da linguagem no Twitter em suas manifestações fáticas, conversacionais ou como “backchannel” de outras atividades (vide segunda tela). Fatores da affordance do Twitter, como tamanho, hashtags e sua temporalidade própria são também analisadas. Neste capítulo a autora apresenta as primeiras aplicações de técnicas de linguística de corpus, como frequência de palavras:

hermes corpus - michele zappavigna

Evaluation in Microblogging, o terceiro capítulo, percorre o corpus HERMES a partir dos marcadores de sentimento/avaliação Julgamento, Afeto e Apreciação. Cada um dos “sistemas” de avaliação é explorado em detalhes, com inúmeros exemplos. Até o uso de emoticons é analisado de forma minuciosa, a partir da compreensão das emoções  expressas pelos usuários:

articulation network for facial emoticons

A criação de afiliação através dos textos é o tema do quarto capítulo, Ambient Affiliation. Através deste termo, a Michele Zappavigna procura mostrar como a plataforma é utilizada pelos seus usuários para gerar afiliações em torno de temas, tópicos e identidades. Aplicando o sociólogo Goffman, autor que melhor entendeu os processos micro-interacionais já na década de 1930 e hoje é aplicado em inúmeros estudos online, Zappavigna fala inclusive de como diversos estudos, inclusive o seu, mostram que técnicas de agrupamento (clustering) dão resultados consistentes apesar da aparente dispersão dos usuários. A liga social, neste caso, é a própria linguagem.

“we affiliate with a co-present, impermanente community by bonding around evolving topics of interest. This function is directly inscribed in the web interface to users’ Twitter accounts as the list of trending topics”

Nos três capítulos seguintes, Internet Memes, Internet Slang Internet Humour and fail: ‘The world is full of #fail tonight”, o livro analisa algumas particularidades das gírias, memes e humor no Twitter. Em sua maioria dos casos, são circulações meméticas que perpassam várias plataformas, como reddit e 4chan. Um trecho particularmente interessante é a análise da redefinição e complexificação do termo geek.

michele zappavigna collocates - geek out

Por fim, no nono capítulo, Political discourse online, a autora analisa um sub-corpus do Hermes chamado OWC – Obama Win Corpus. São 45290 publicados nas 24 horas subsequentes à vitória de Barack Obama nas eleições de 2008. O foco da análise se dá em torno da ideia de “mudança” (change), explorada pela campanha e militantes do político. É bem interessante também o relato que a autora faz dos tweets falando do cachorro presidencial, uma tradição no processo de construção da imagem dos presidentes americanos.michele zappavigna - collocates OWC - puppy

Por fim, nas conclusões a autora problematiza o futuro e limitações da linguística de corpus para as mídias sociais, especialmente relacionados à circulação de informação, inclusive textual, em formato de imagens.

+ Mais sobre Michele Zappavigna:

Twitter – https://twitter.com/smlinguist

Publicações – http://socialmedialinguist.blogspot.com.br/p/publications.html

Página na UNWS – https://sam.arts.unsw.edu.au/about-us/people/michele-zappavigna/

Google Scholar – https://scholar.google.com/citations?user=ILicbSEAAAAJ&hl=en