Help on module infer-sentneg:

NAME
    infer-sentneg - # -*- coding: utf-8 -*-

CLASSES
    InferenceIGT.InferenceIGT(builtins.object)
        NegationIGT
    builtins.object
        SententialNegation
    
    class NegationIGT(InferenceIGT.InferenceIGT)
     |  Class to collect negation related information about a single IGT.
     |  
     |  Method resolution order:
     |      NegationIGT
     |      InferenceIGT.InferenceIGT
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, NEG_IGT)
     |      Initialize NegationIGT instance by setting all negation related values
     |      for a single IGT instance.
     |      
     |      Args:
     |         NEG_IGT        -- An IGT (in Xigt format) that exhibits negation
     |  
     |  get_neg_free_type(self, neg, g_id)
     |      Determine the negation free morpheme type: head, mod or comp
     |      
     |      Args:
     |         neg    -- A gw_id for an item that was glossed for negation
     |         g_id   -- The corresponding g_id (gloss tier)
     |      
     |      Returns:
     |         string -- The values of 'head', 'mod' or 'comp' as discovered
     |  
     |  get_neg_morph_type(self, neg, g_id)
     |      Determine the negation morpheme type: bound or free.
     |      
     |      Args:
     |         neg    -- A gw_id for an item that was glossed for negation
     |         g_id   -- The corresponding g_id (gloss tier)
     |      
     |      Returns:
     |         string -- The values of 'bound' or 'free' as discovered
     |  
     |  is_neg_aux(self, neg, g_id)
     |      Determine if a negation gram represents negation by auxiliary.
     |      
     |      Args:
     |         neg    -- A gw_id for an item that was glossed for negation
     |         g_id   -- The corresponding g_id (gloss tier)
     |      
     |      Returns:
     |        bool    -- True if auxiliary, False otherwise
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from InferenceIGT.InferenceIGT:
     |  
     |  all_glosses_in_word(self, word_id)
     |      Generate a list of all glosses for the given word.
     |      
     |      Args:
     |         word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         list -- all glosses in word
     |  
     |  get_adjacent_pos_tags(self, word_id)
     |      Determine the POS tags of the words on either side of the given word.
     |      Again, check both POS tiers if necessary/possible.
     |      
     |         Args:
     |            word_id -- A word tier or glossed word tier id
     |      
     |         Returns:
     |            list -- Item zero is left POS tag, item one is right POS tag
     |  
     |  get_bound_orthography(self, g_id)
     |      Find the orthography associated with the given g_id.
     |      
     |       Args:
     |          g_id -- A gloss tier id
     |      
     |      Returns:
     |         string -- orthography of gloss
     |  
     |  get_free_orthography(self, word_id)
     |      Find the orthography associated with the given word.
     |      
     |       Args:
     |          word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         string -- orthography of word
     |  
     |  get_gw_id(self, w_id)
     |      Find the gw_id (gloss word tier) associated with the given w_id.
     |      
     |      Args:
     |         w_id -- A word tier id
     |      
     |      Returns:
     |         string -- gw_id
     |  
     |  get_has_conjunction(self)
     |      Determine if this IGT contains conjunctions by first checking
     |      the glossed word POS tier and if that fails the dependency 
     |      parse tier.
     |      
     |         Returns:
     |            bool -- True if IGT contains conjunctions
     |  
     |  get_is_question(self)
     |      Determine if this IGT represents a question.
     |      
     |      Returns:
     |         bool -- True if IGT is a question
     |  
     |  get_m_id(self, g_id)
     |      Find the m_id (morpheme tier) associated with the give g_id.
     |      
     |      Args:
     |         g_id -- A gloss tier id
     |      
     |      Returns:
     |         string -- m_id
     |  
     |  get_pos_tag(self, word_id)
     |      Determine the POS tag of the word provided.
     |      Check both POS tiers if necessary/possible.
     |      
     |         Args:
     |            word_id -- A word tier or glossed word tier id
     |      
     |         Returns:
     |            string -- POS tag of word
     |  
     |  get_primary_verb_loc(self)
     |      Make several attempts to determine the primary verb in the sentence
     |      represented by the IGT. First look at the dependency parse tier, then
     |      the phrase structure parse and POS tiers. If all attempts fail return
     |      a value of None.
     |      
     |         Returns:
     |            string -- The word tier (w_id) of the primary verb
     |  
     |  get_ps_children(self, word_id)
     |      Generate a list of the phrase structure children, if any, for the given word.
     |      
     |      Args:
     |         word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         list -- List of wps_id values for children
     |  
     |  get_ps_parent(self, word_id)
     |      Determine the parent phrase structure element for the given word.
     |      
     |      Args:
     |         word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         tuple -- Item zero is parent wps_id, and item one is parent phrase structure element name
     |  
     |  get_ps_siblings(self, word_id)
     |      Generate a list of the phrase structure sibling, if any, for the given word.
     |      
     |      Args:
     |         word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         list -- List of wps_id values for siblings
     |  
     |  get_verb_relative_loc(self, word_id)
     |      Determine the verb relative (before or after) location of the 
     |      given word.
     |      
     |         Args:
     |            word_id -- A word tier or glossed word tier id
     |      
     |         Returns:
     |            string -- Representing location, 'before' or 'after', verb
     |  
     |  get_w_id(self, gw_id)
     |      Find the w_id associated with the given gw_id.
     |      
     |      Args:
     |         gw_id -- A word gloss tier id
     |      
     |      Returns:
     |         string -- w_id
     |  
     |  get_word_modifies(self, word_id)
     |      Determine what phrase structure element (V, VP, or S) is modified
     |      by the given word.
     |      
     |         Args:
     |            word_id -- A word tier or glossed word tier id
     |      
     |         Returns:
     |            string -- Phrase structure element value of 'v', 'vp', or 's'
     |  
     |  gram_in_gloss_count(self, gram_list)
     |      Determine how many times any of a list of grams appear in a gloss line.
     |      
     |      Args:
     |         gram_list -- List of grams to searh for in gloss line
     |      
     |      Returns:
     |         int -- count of grams
     |  
     |  gram_in_tier(self, gram_list, a_tier)
     |      Determine if a gram from the list appears in the given tier.
     |      
     |      Args:
     |         gram_list -- The list of grams to search for
     |         a_tier -- The tier to search
     |      
     |      Returns:
     |         bool -- True if any gram in tier, False otherwise
     |  
     |  gram_in_tier_item(self, gram_list, tier_item)
     |      Determine if any gram from the gram list appears in the tier item.
     |      
     |      Args:
     |         gram_list -- The list of grams to search for
     |         tier_item -- The Xigt object to search
     |      
     |      Returns:
     |         bool -- True if any gram in item, False otherwise
     |  
     |  is_affixed(self, tier_item)
     |      Determine if the given item displays affixation.
     |      
     |      Args:
     |         tier_item -- Likely a word tier or glossed word tier id
     |      
     |      Returns:
     |         bool - True if item shows affixation, False otherwise
     |  
     |  is_verb_adjacent(self, word_id)
     |      Determine if there is a verb on either side of the given word.
     |      
     |      Args:
     |         word_id -- A word tier or glossed word tier id
     |      
     |      Returns:
     |         bool -- True if verb next door, False otherwise
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from InferenceIGT.InferenceIGT:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
    
    class SententialNegation(builtins.object)
     |  Class to collect and tally the negation related data about a single language.
     |  
     |  Methods defined here:
     |  
     |  __init__(self)
     |  
     |  addIGT(self, negIGT)
     |      Add an IGT that exhibits negation to the list to be tallied.
     |      
     |      Args:
     |         negIGT -- An IGT that exhibits negation
     |      
     |      Returns:
     |         bool   -- Success or failure of addition
     |  
     |  get_free_type(self, neg_key)
     |      Examine frequency tallies to determine negation free morphological type, head, mod or comp for language.
     |      
     |      Args:
     |         neg    -- identifier of negation item
     |      
     |      Returns:
     |         string -- 'head', 'mod', or 'comp'
     |  
     |  get_matching_orthography(self, neg_key)
     |      For a positional negation item, find its matching orthography.
     |      
     |      Args:
     |         neg    -- identifier of negation item
     |      
     |      Returns:
     |         string -- the best matching orthography item
     |  
     |  get_modifies(self, neg_key)
     |      Examine frequency tallies to determine what negation modifier modifies for the language.
     |      
     |      Args:
     |         neg    -- identifier of negation item
     |      
     |      Returns:
     |         string -- 'v', 'vp', or 's'
     |  
     |  get_morph_type(self, neg_key)
     |      Examine frequency tallies to determine negation morphological type, bound or free for language.
     |      
     |      Args:
     |         neg    -- identifier of negation item
     |      
     |      Returns:
     |         string -- 'bound', 'free', or 'variable'
     |  
     |  get_order(self, neg_key)
     |      Examine frequency tallies to determine verb relative order of negation modifier or complement for the language.
     |      
     |      Args:
     |         neg    -- identifier of negation item
     |      
     |      Returns:
     |         string -- 'before', 'after' or 'either'
     |  
     |  ignore_min(self, num1, num2, DEVMUL=2)
     |      Determine if the smaller of two values is significant or noise.
     |      
     |      Args:
     |         num1, num2     -- integer values
     |         DEVMUL         -- multiplier
     |      
     |      Returns:
     |         bool -- True if min values in not significant, True otherwise
     |  
     |  init_tallies(self, tally_o, neg_key)
     |      Initialize a negation related values structure to record tallies
     |      for a single negation item.
     |      
     |      Args:
     |         tally_o        -- The tally structure to be initialized
     |         neg_key        -- The negation item for which tallies will be recorded
     |  
     |  ortho_tally(self, negators)
     |      Update tallies of negation related values for all orthography negation items for a single IGT.
     |      
     |      Args:
     |         negators       -- A dict containing negation values of all orthography negation items for a single IGT
     |  
     |  position_tally(self, negators)
     |      Update tallies of negation related values for all postional negation items for a single IGT.
     |      
     |      Args:
     |         negators       -- A dict containing negation values of all positional negation items for a single IGT
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  is_Jespersen
     |      Determine if the language could be in Jespersen cycle.
     |  
     |  neg_exp
     |      Determine the negation exponence by finding max exponence tally.

FUNCTIONS
    output_choices(choices, SN, lang_exponence, Jespersen)
        Use the tally results and write the appropriate choces to the output file specified.
        
        Args:
           choices           -- the output file descriptor
           SN                -- the SententialNegation class instance used for tallies
           lang_exponence    -- the exponence value calculated
           Jespersen         -- the Jespersen setting calculated
    
    similarity(v1, v2)
        Cosine similarity function.
        
        Args:
           v1, v2    -- feature = value pairs (dicts)
        
        Returns:
           float     -- Similarity measure between 0 and 1 with 1 being exact match

DATA
    POS_to_free_type = {'ADV': 'mod', 'PRT': 'comp'}
    aux_grams = ['aux']
    comp_tags = ['prt']
    cop_grams = ['cop', 'be']
    fxn_grams = ['antip', 'appl', 'ben', 'caus', 'compl', 'decl', 'dur', '...
    mod_grams = ['can', 'may', 'might', 'should', 'would', 'could', 'do', ...
    mod_tags = ['adv']
    negation_grams = ['neg', 'not', 'neg1', 'neg2']

FILE
    /home2/asp7991/LING700/infer-sentneg.py


