.. _fwflag_lex_boolean: ============== --lex_boolean ============== Switch ====== --lex_boolean Description =========== Collapses the final lexicon/category value produced by :doc:`fwflag_add_lex_table` (or :doc:`fwflag_add_corp_lex_table`) to a constant ``1.0`` for any group where the category is present, as opposed to :doc:`fwflag_boolean` which does the same for the underlying word/ngram frequencies that feed into that value. Argument and Default Value ========================== No argument. Boolean switch, default: ``False`` (no transform applied to the lexicon value). Details ======= Verified: folds a suffix into the lexicon name portion of the table, joined with an underscore rather than a ``$``, e.g. ``feat$cat_met_a30_2000_cp_w_16to1$msgs$user_id`` for a weighted lexicon (``int(1.0) == 1``). See :doc:`fwflag_lex_sqrt` for the general naming mechanism. Useful for turning a weighted/frequency lexicon into a simple presence/absence feature per group. Other Switches ============== Required Switches: * :doc:`fwflag_add_lex_table` or :doc:`fwflag_add_corp_lex_table` * :doc:`fwflag_l` LEX_TABLE Optional Switches: * :doc:`fwflag_lex_sqrt`, :doc:`fwflag_lex_log`, :doc:`fwflag_lex_anscombe` (mutually exclusive alternatives — only one lexicon value transform can be active at a time) Example Commands ================ .. code-block:: bash dlatkInterface.py -d dla_tutorial -t msgs -c user_id --add_lex_table -l met_a30_2000_cp --weighted_lexicon --lex_boolean