Skip to main content

ASC-analyzer

The ASC analyzer extracts Argument Structure Constructions (ASCs) from raw English texts and computes indices related to ASC usage.

Installation

To ensure stability, I recommend installing dependencies in the following order:

  1. Install spaCy:

    pip install spacy
    
  2. Install spaCy-transformers:

    pip install spacy-transformers
    
  3. Download the transformer-based spaCy model:

    python -m spacy download en_core_web_trf
    
  4. Install the ASC analyzer package:

    pip install asc-analyzer
    

Quickstart

Prepare a directory with .txt files (e.g., data/text/). Each file should contain plain English text.

Then run:

asc_analyzer \
  --input-dir data/text \
  --source cow \
  --print-asc \
  --save-asc-output

This command will:

  • Assign ASC tags to each sentence
  • Print the ASC-tagged results directly to the terminal (--print-asc)
  • Save token-level ASC tagging results as *_ASCinfo.txt files (--save-asc-output)
  • Compute ASC usage statistics (e.g., diversity, proportion, frequency, and verb–ASC association strength) and save them in a CSV summary file
  • The --source option determines which reference corpus is used for computing frequency and association measures:
    • cow: uses the COW corpus (web-based, written English)
    • subt: uses the SUBTLEX corpus (subtitle-based, spoken English)
    • Choose the source based on the register that best matches your input data.

Options

Option Description
--input-dir Directory containing .txt files to process (default: asc_analyzer/data/test)
--output-csv Path to save the resulting CSV (default: Written_COW.csv or Spoken_SubT.csv)
--source Reference dataset: cow (written, default) or subt (spoken)
--indices Comma-separated list of index names to include in the CSV (default: all standard indices)
--save-asc-output Save ASC-tagged outputs as *_ASCinfo.txt in the input directory
--print-asc Print ASC-tagged results to the terminal

Output for --print-asc

When using the --print-asc option, the output for each sentence shows aligned token information and its ASC label (None if no ASC applies):

# sent_id = 1
1	The	the	
2	idea	idea	
3	is	be	ATTR
4	trust	trust	

You can save this output to txt files by including --save-asc-output.

Citation

License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Metadata

Release files for asc-analyzer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asc-analyzer 0.1.1
File Size Uploaded
asc_analyzer-0.1.1.tar.gz 12.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for asc-analyzer 0.1.1
File Interpreter ABI Platform
asc_analyzer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.1 MB

Release files / asc_analyzer-0.1.1.tar.gz

Download URL asc_analyzer-0.1.1.tar.gz
Size 12.7 MB
Tags Source
SHA-256 checksum
How to use checksums
05f72d6e9b0964bc9857f1978a9bdc43b9f1d087c6b19e0b54cceedbd5499114
BLAKE2b-256 checksum
How to use checksums
8a0e17107db729f2bff97c5d9643db127e51431549086bef62216dbb1c000008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / asc_analyzer-0.1.1-py3-none-any.whl

Download URL asc_analyzer-0.1.1-py3-none-any.whl
Size 13.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
617c59735a92166e423ee1986d0b1d648d142d4652771ce750f4cdd5ed598ded
BLAKE2b-256 checksum
How to use checksums
69dc420df730d51b168223a73e2f07577ee17a9bbfa33c53cbb91b38807b72e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page