Development of an online tense and aspect identifier for English

This article describes the development of a tense and aspect identifier, an online tool designed to help learners of English by harnessing a natural language processing pipeline to automatically classify verb groups into one of 12 grammatical tenses. Currently, there is no website or application that can automatically identify tense in context, and the tense and aspect identifier fills that niche. Learners can use the tool to see how grammatical tenses are used in context. Finite verb groups are automatically identified, and the relevant words in the verb group are highlighted and colorized according to the tense identified. The latest deployed system can identify tenses in simple, compound, and complex sentences. False positive results occur when there is ellipsis of auxiliary verbs or when the tagger assigns the incorrect part-of-speech tag. The user interface of the tense identifier is a web app created using the Flask framework and deployed from the Heroku platform. The tool can be used for inductive and deductive teaching approaches, or even to check for tense consistency in a thesis.


Introduction
Basic internet searches identify websites that explain the form and function of tenses, and numerous examples of each tense can be found. However, when teachers or learners want to identify the tense and aspect in a particular sentence, no online tool was discovered that could automatically identify the grammatical tense of sentences submitted by users.
As pointed out by Blake (2019, p. 76), the tense and aspect identifier is designed to fill that niche by harnessing a natural language processing pipeline to automatically classify verb groups by grammatical tense. A tool that could identify tense would help learners recognize tenses in context, raising awareness of their usage. As Schmidt (1990) asserts in his noticing hypothesis, learners need to pay attention to particular language features before they can be learned.
The following section introduces the relevant grammatical concepts that underpin this research. The development and evaluation methods are then briefly described.
The main deliverable, the tense and aspect identifier, is presented in the results and discussion section. The conclusion describes the usage of the tool, its limitations and future work.

Background
The majority of published coursebooks designed for English language learning are structured so that learners are exposed to grammatical tenses in a systematic manner, frequently starting with present tenses. The choice of tense and verb impacts meaning, and so learners need to understand these grammatical tenses.
There are two tenses in English: present and past; and three grammatical aspects, namely future, perfect, and progressive. These combine to create 12 verb forms as shown in Table 1. Eight of these forms are tensed (past or present forms) while four are modalized (future forms). Textbooks designed to help non-native speakers of English make extensive use of these 12 verb forms or grammatical tenses (Yule, 1998). According to Biber et al. (1999), 85% of all verb forms in spoken English are tensed. The frequency distribution of tenses is skewed to favor simple forms that account for 90% of all cases. The four verb forms that are classed as perfect progressive make up less than 0.5% of all verb forms. Despite their relative rarity, they regularly feature in language tests that focus on grammar, such as Japanese university entrance examinations. Tense usage varies greatly between languages. Table 2 shows three sentences using present progressive tense in Japanese, which when translated into English result in three different tenses. This lack of a one-to-one mapping causes significant challenges for learners.

Method
Automatic identification of grammatical tense is a non-trivial task. Six different systems were created using different approaches. The approaches included a rule-based approach, a hybrid machine learning approach, a deep learning model, and different design structures using the Natural Language ToolKit (NLTK) (Bird, Loper, & Klein, 2009). The NLTK is a popular collection of libraries and programs that can be used by software or scripts written in Python to process English texts.
A mobile-first approach was adopted for the design of the graphical user interface in all the systems. Scalability was also prioritized to cope with large numbers of simultaneous users. The systems were compared on usability, accuracy, and processing speed. A series of problem-discovery usability tests were conducted with 30 Japanese computer science majors undertaking a course in computational linguistics and educational technology. Each test involved students attempting tasks with the aim of uncovering problems with the interface and system.
Accuracy tests were also carried out by the undergraduates using two tailormade datasets: one dataset balanced by tense and voice, and the other balanced by tense and function. Processing speed was measured coarsely as fast when results were displayed immediately or slow when users had to wait for results to load.

Results and discussion
The system with the highest scores for usability and accuracy was achieved via a pipeline created using NLTK and a parse tree stored server-side in a Python dictionary. This system is the focus of this article. The systems that processed only single sentences, however, were significantly faster with no noticeable wait time before the results were displayed. The user interface of the NLTK tense and aspect identifier is a web app created using the Flask framework and deployed from the Heroku platform.
This tool automatically identifies finite verb groups, highlights the relevant words, and colorizes the background of the verb groups according to their grammatical tense. Teachers and learners of English can use this tool to identify the 12 grammatical tenses in any sentence, simply by typing or copy-and-pasting sentences into the input box. The result is displayed once the text is submitted. Figure 1 shows the output of a simple short story. Additional functionalities are being added into this interface. When clicking on a colorized verb group, further details such as voice and lexical meaning are displayed in a pop-up box, as shown in Figure 2. Multimedia explanations in English and Japanese have also been prepared but are not yet deployed. There is also space for grammatical meaning in context, but that functionality is not yet implemented.

Figure 2. Screenshot of additional information available in pop-up box
Feedback received during usability testing on the currently deployed version with both teachers and learners was positive. One usability study participant actually checked his own graduation thesis with this tool and found a number of errant uses of present tense in place of past tense in the method section.

Conclusion
The tense and aspect identifier can find finite verb groups, highlight relevant words, classify tense into one of 12 categories, and colorize the verb groups according to grammatical tense. The latest deployed system (https://www.jb11.org/tenseidentifier.html) can identify tenses in simple, compound, and complex sentences.
Students and teachers of English may find this tool useful to identify not only the tense of the sentence, but also to understand the complex interaction between tense, aspect, and modality. The tense identifier, as mentioned elsewhere (Blake, 2019, p. 76), can be used to learn the English tense system either inductively by inputting numerous sentences and working out the rules, or deductively to confirm whether sentences input conform to the rule. The tool can be used to raise learners' awareness of how grammatical tenses are used in context. A discovery learning approach, in which learners work out the tenses in a text and then compare those with the colorized output, can also be used.
In the next release, the parse tree will be refined to take account of elided auxiliary verbs for transitive verbs as the current system can only deal with elisions for intransitive verbs or transitive verbs that share the same direct object. The accuracy of alternative part of speech taggers will be compared and the tagger with the highest accuracy will be incorporated. Additional information will also be displayed in the pop-up box, including grammatical meaning in context, and video explanations of the tense.