--add_wn_pos

Switch

--add_wn_pos

Description

Creates a WordNet concept feature table (each word mapped to its WordNet synsets, disambiguated by part-of-speech), based on an existing POS-tagged feature table.

Argument and Default Value

No argument. Boolean switch, default: False. Requires the nltk WordNet corpus (python -c "import nltk; nltk.download('wordnet')").

Details

Passes whatever table is currently set via -f in as the POS table (built by --add_pos_table), and separately expects a default-scaled 1gram word table to already exist for group-frequency thresholding.

Known issue — broken in SQLite mode. Like --add_wn_nopos, FeatureExtractor.addWNPosFeat() checks the word table's existence via a raw mm.tableExists(...) call. Verified: fails with sqlite3.OperationalError: near "show": syntax error under a SQLite corpus.

Other Switches

Required Switches:

Example Commands

Requires MySQL — broken against SQLite, see Known issue above:

dlatkInterface.py -d dla_tutorial -t msgs -c user_id --add_ngrams -n 1
dlatkInterface.py -d dla_tutorial -t msgs -c user_id --add_pos_table
dlatkInterface.py -d dla_tutorial -t msgs -c user_id -f 'feat$pos$msgs$user_id' --add_wn_pos