Logo
  • Installation
    • Recommended Install
    • Full Install
      • Setup
        • Linux
        • OSX (with brew)
        • Install (pip)
        • Install (Anaconda)
        • Install (GitHub)
      • Install Other Dependencies
        • Load NLTK corpus
        • Install Stanford Parser
        • Install Tweet NLP v0.3 (ark-tweet-nlp-0.3)
        • Python Modules (optional)
        • Install the IBM Wordcloud jar file (optional)
        • Mallet (optional)
    • Full List of Dependencies
      • Python
      • Other
      • Python (optional)
      • Other (optional)
    • Python version support
    • Getting Started
      • Command Line Interface
      • MySQL Configuration
      • Sample Datasets
      • Next Steps
    • Install Issues
  • Github Repo
  • Getting started in Colab
  • Tutorials
    • Getting started
    • Text Cleaning and Transformations
    • Feature Extraction
    • Viewing your data and output
    • Prediction
    • Clustering
    • LDA with Mallet
    • Data Engines
    • Other Topics
    • Video Tutorials
  • Packaged Datasets
    • Language Data
      • Blog Authorship Corpus
    • Lexica
      • Age and Gender Lexica
      • PERMA Lexicon
      • Spanish PERMA Lexicon
      • Other Lexica
    • LDA Topics
      • 2000 Facebook Topics
  • dlatkInterface Flags by type
    • Setup
    • Preprocessing
    • Feature Extraction
    • Feature Refinement
    • Language Insights
    • Clustering
    • Prediction
      • Regression
      • Classification
    • Visualization
  • Papers Utilizing DLATK
    • DLATK Paper
    • Peer Reviewed Publications
      • 2020
      • 2019
      • 2018
      • 2017
      • 2016
      • 2015
      • 2014
      • 2013
DLATK
  • --print_freq_csv
  • View page source

--print_freq_csv

Switch

--print_freq_csv FILENAME

Description

Prints raw group frequencies (rather than group-normalized values) to a csv file — otherwise the same as --print_csv.

Argument and Default Value

A file path. Default: None.

Details

Known issue — the filename you pass is ignored. dlatkInterface.py calls oa.printGroupsAndOutcomesToCSV(fg, args.printcsv, freqs=True) — using args.printcsv (the value of --print_csv) instead of args.printfreqcsv. Verified: running --print_freq_csv ./x.csv alone (without also passing --print_csv) results in args.printcsv being None, which then fails the same way described below rather than writing to ./x.csv.

Known issue — also MySQL-only. This calls the same oa.printGroupsAndOutcomesToCSV() as --print_csv, which checks table existence via a direct mysqlmethods call rather than the SQLite-aware abstraction. Verified: fails with sqlite3.OperationalError: near "show": syntax error under a SQLite corpus.

Other Switches

Required Switches:

  • -d, -t, -g

  • -f

  • --outcome_table, --outcomes

Example Commands

# Broken as of this writing (see Known issues above) — filename is silently swapped and MySQL only works
dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$1gram$msgs$user_id$16to16' \
--outcome_table blog_outcomes --outcomes age --print_freq_csv ./freqs.csv

© Copyright 2024, H. Andrew Schwartz and Salvatore Giorgi.

Built with Sphinx using a theme provided by Read the Docs.