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:
- Intro, Opening a File and Settings (we are here)
- Word Lists and File Viewer
- Concordancer and Concordance Plot
- Clusters and N-Grams (soon)
- 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:
- Digital Methods Initiative
- TAPoR
- Social media data collection list
- Social media research toolkit
- Twitter as a data source
- Médialab 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. |
- 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
- 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:
Default:
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.
Recommended:
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
- 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