GithubHelp home page GithubHelp logo

janwillemb / tscan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from centrefordigitalhumanities/tscan

0.0 1.0 0.0 37.94 MB

T-scan: an analysis tool for dutch texts to assess the complexity of the text, based on original work by Rogier Kraf

License: GNU Affero General Public License v3.0

Shell 3.28% C++ 80.98% Python 8.52% XSLT 4.09% Makefile 0.43% M4 1.58% Dockerfile 1.11%

tscan's Introduction

Actions Status Actions Status DOI

T-Scan

tscan 0.9 (c) TiCC/ 1998 - 2023

Tilburg centre for Cognition and Communication, Tilburg University.
UiL-OTS, Utrecht University
Language Machines, Centre for Language Studies, Nijmegen

T-Scan is distributed under the GNU Affero Public Licence (see the file COPYING).

T-Scan is an analysis tool for dutch texts to assess the complexity of the text, and is based on original work by Rogier Kraf (Utrecht University) (see: Kraf et al., 2009). The code has been reimplemented and extended by Ko van der Sloot (Tilburg University), Martijn van der Klis (Utrecht University) and is currently maintained and continued by Luka van der Plas and Sheean Spoel (both Utrecht University).

Web application / Webservice

This repository contains the T-Scan source code, allowing you to run it yourself on your own system. In addition, T-Scan is available as a web application and webservice through https://tscan.hum.uu.nl/tscan/. You can create an account or contact us if your institution is not (yet) recognized.

Documentation

Extensive documentation (in Dutch) can be found in docs/tscanhandleiding.pdf.

Installation

T-Scan heavily depends upon other software, such as Frog, Wopr and Alpino.

Installation is not trivial, to be able to successfully build T-Scan from the tarball, you need the following packages:

We strongly recommend to use Docker to install T-scan. Be aware that T-scan and dependencies are memory intensive, we recommend at least 16GB RAM for proper operation. If WOPR is used (which is enabled by default!) more RAM is required: 32 GB is recommended.

Docker

This version of T-Scan can run directly from Docker:

$ docker-compose up

Default address: http://localhost:8830

To speed up rebuilds the Dockerfile makes extensive use of caching. The following can be found in docker/data:

  • build-cache: this contains the output of the compiled C++ code, helps speed up a rebuild where the code didn't change
  • compound-dependencies: dependencies for the compound splitter, nearly 820 MB which you really don't want to have to download again on every rebuild
  • compound-dependencies/dist: the Python package for the compound splitter
  • packages: the prebuilt dependencies (Frog, Ucto, etc)

Only the build-cache has automatic invalidation, if you want to update your dependencies you need to delete (parts) of this cache. The cache will be automatically recreated during startup.

Manual Build

If you do not want to use (the provided) dockerfile, first make sure you have all necessary dependencies and then compile/install as follows:

$ bash bootstrap.sh
$ ./configure --prefix=/path/to/installation/
$ make
$ sudo make install
$ cd webservice
$ sudo python3 setup.py install

Usage

Before you can use T-Scan you need to start the background servers (you may need to edit the scripts to set ports and paths):

$ cd tscan/webservice
$ ./startalpino.sh
$ ./startfrog.sh
$ ./startwopr20.sh    (will start Wopr to calculate forwards probabilities)
$ ./startwopr02.sh    (will start Wopr to calculate backwards probabilities)

Then either run T-Scan from the command-line, which will produce a FoLiA XML file,

$ cd tscan
$ cp tscan.cfg.example tscan.cfg
(edit tscan.cfg if necessary)
$ tscan --config=tscan.cfg input.txt

... or use the webapplication/webservice, which you can start with:

$ cd tscan/webservice/tscanservice
$ clamservice tscanservice.tscan   #this starts the CLAM service for T-Scan

And then navigate to the host and port specified.

Tests

Tests can be run using make check. This requires running the Frog services:

cd webservice
./startfrog.sh &

Pre-parsed Alpino files are included. It is also possible to remove these and update them for a newer version of Alpino.

./startalpino.sh &
cd ../tests/
rm alpino_lookup.data
rm *.alpino
./testall
./merge_alpino_output.py

Note: the output can change when a different version of Alpino or Frog is used.

Data

Word prevalence values (in data/prevalence_nl.data and data/prevalence_be.data) courtesy of Keuleers et al., Center for Reading Research, Ghent University.

Certain parts of T-Scan use data from Referentiebestand Nederlands, which we can not distribute due to restrictive licensing issues, so this functionality will not be available.

Certain other data is too large for GitHub, but will be downloaded for you automatically by the ./downloaddata.sh script.

References

  • Kraf, R. & Pander Maat, H. (2009). Leesbaarheidsonderzoek: oude problemen en nieuwe kansen. Tijdschrift voor Taalbeheersing 31(2), 97-123.
  • Pander Maat, H. & Kraf, R. & van den Bosch, A. & Dekker, N. & van Gompel, M. & Kleijn, S. & Sanders, T. & van der Sloot, K. (2014). T-Scan: a new tool for analyzing Dutch text. Computational Linguistics in the Netherlands Journal 4, 53-74.
  • Keuleers, E. & Stevens, M. & Mandera, P. & Brysbaert, M. (2015). Word knowledge in the crowd: Measuring vocabulary size and word prevalence in a massive online experiment. The Quarterly Journal of Experimental Psychology 68(8), 1665-1692.

tscan's People

Contributors

kosloot avatar mhkuu avatar oktaal avatar proycon avatar lukavdplas avatar duchadian 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.