GithubHelp home page GithubHelp logo

tense-analysis's Introduction

Tense Analysis

The tense-analysis.py script contains the source code used to evaluate the ratio of past to present-tense verbs in a corpus created from academic mathematics papers uploaded to the ArXiv, as well as the Brown and LOB corpora.

In order to run this script, you will need to install Python (version 3.8) and NLTK (version 3.6). Details on how to install Python can be found here: https://www.python.org, and you can learn how to install NLTK here: https://www.nltk.org/install.html.

Once you have these installed you can run the script by placing it in a folder with the corpora. Your file structure should look like this:

|-- tense_analysis.py
|-- corpus
   |-- file1.txt
   |-- file2.txt
   |-- file3.txt
   etc.

Finally, you will need to change the code on lines 122 and 123 to tell Python which folder the corpus is located in. For example, if you were analysing the LOB corpus, these two lines should read:

data = analyse_corpus('./lob_corpus')
save_data('lob_corpus.csv', data)

The example above tells Python to analyse the corpus located in the lob_corpus folder, and then to save the data to a file called lob_corpus.csv

tense-analysis's People

Contributors

jda5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.