Skip to main content

Keep track of text locations!

Project description

Text Tracker

Background: Running Records

Research shows that one of the best ways to promote literacy in elementary aged students is to track their progress via the Running Records program, in which the teacher scores the student's reading abilities in a live, in-person reading test. This way, teachers can help students in the areas they need most. However, this process is extremely time consuming, so a small team of students at Clemson University is researching ways to automate the scoring process.

Following Along

The two primary challenges of the project are transcribing the student's words, and keeping track of where the student is in the testing book so that the transcription may be accurately scored. The transcription part is handled by third party services such as IBM's Watson, but we were unable to find pre-existing algorithms that could accomplish the second part: following along with the student.

Applications

This package includes tools to analyze text files and align two texts with each other so that they may be compared or scored. This addresses the problem of following along with a student during a Running Records assessment. Applications may extend to any unlimited number of projects, such as plagiarism detection, soft string matching, and more.

Usage

This package is available on PyPI and can be installed via

pip install text-tracker

and used via

import text_tracker
text_tracker.track([original_file], [spoken_file])

or

from text_tracker import track
track([original_file], [spoken_file])

View this project on GitHub:

https://github.com/supercooper6558/Text-Tracker

Detailed Operation

Let's say we have two text files with the following content.

File 1:

The other day I went to the other store where the day was long
one day a bird met a hippo

File 2:

The other other day word I i went to the the word the other store the day was long
one day a bird a word bird met a hippo

Note that the last line of each file is an empty blank line. This is important.

To use the package in python, open both files and pass them to the track function, such as follows:

from text_tracker import track
with open('original.txt', 'r') as o:
    with open('test.txt', 'r') as t:
        indeces = track(o, t)

indeces would be a list of the following two index vectors:

[0, 1, 1, 2, nan, 3, 3, 4, 5, 6, nan, 6, 6, 7, 8, 10, 11, 12, 13]
[0, 1, 2, 3, 2, nan, 3, 4, 5, 6]

What's going on here? The files contain two texts that are being compared. Capitalization doesn't matter - the algorithm converts everything to lowercase before doing anything else. The files should contain no punctuation, unless you want it considered part of a word. The only delimiters is the space character, so if you have a comma at the end of a word, the program will treat the comma character as part of the word and likely not find any matches for that combination. Each line is evaluated separately, so it would be helpful to use each line as a page in a book. Both files must have the same number of lines.

The output is a list of index vectors. For each "page" (or line), there is an associated index vector, where each element maps a spoken word to a written word. If a word appears in the "spoken" file that does not appear in the "written" file, it will be associated with NaN.

Credits

This was developed by Cooper Sanders in 2020 and is MIT licensed. You can contact me at

mailto:tromboneguy@coopersanders.com

clemson.edu domain email addresses can contact me at

mailto:cssande@clemson.edu

My website:

https://coopersanders.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text-tracker-1.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_tracker-1.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file text-tracker-1.0.1.tar.gz.

File metadata

  • Download URL: text-tracker-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for text-tracker-1.0.1.tar.gz
Algorithm Hash digest
SHA256 acb7e38618ac7ccc5df4d2a32305ece7c81fac00d6467fc4e91743f92770f8a6
MD5 72428c7a208ea2267b996b59ed3ba128
BLAKE2b-256 647582b26079567626746b4354277380f98942881cd1a8d9a6d1d8b521dca2b4

See more details on using hashes here.

File details

Details for the file text_tracker-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: text_tracker-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for text_tracker-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d0af3526442e8c64bb426626fd1c441ac6e3d6e3e24edd79f7fff302b7a7fa
MD5 17acecb1a3672e0cea13f51e56c30b25
BLAKE2b-256 d69d331a134fbb2125e9858195c604a53140377a19b509d6e72aaa654d671a36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page