This is a part of the HfstAPIGeneralizedRestrictionLayerOLD. It is kept on a separate page in order to keep the core simple.

HFST: Functions Supporting Substring Variables

Creating New Substring Variables

Type Function Comment hfst-lexc hfst-twolc
VarHandle create_var_type2 () Create a FO variable used to limit a substring    
VarSetHandle create_var_set () Create an empty set of FO variables    
VarSetHandle insert_var (VarSetHandle s, VarHandle x) Insert an FO variable to set s    

Functions That Relate Substring Variables to Variable-Free Conditions

Type Function Comment hfst-lexc hfst-twolc
OvertFstHandle var_is_member (VarHandle x, TransducerHandle t) Asserts that substring x is recognized by t.    
OvertFstHandle var_partition (VarHandle v, VarHandle x, VarHandle y) Asserts that string is partitioned into substrings v, x and y.    
OvertFstHandle var_is_substring_with_context (VarHandle x, TransducerHandle rc, TransducerHandle cntr, TransducerHandle rc, bool padded) Asserts that x is substring of strings in cntr that is surrounded by (padded) contexts lc and rc.    
OvertFstHandle var_has_context (VarHandle x, TransducerHandle lc, TransducerHandle rc, bool padded) Asserts that substring x is surrounded by (padded) contexts lc and rc.    
OvertFstHandle var_precedes (VarHandle x, TransducerHandle rc, bool padded) Asserts that substring x precedes (padded) right context rc.    
OvertFstHandle var_follows (VarHandle x, TransducerHandle lc, bool padded) Asserts that substring x follows (padded) left context lc.    
(this table is subject to minor changes)

Functions That Compare or Rename Substring Variables

Type Function Comment hfst-lexc hfst-twolc
OvertFstHandle var_embeds (VarHandle x, VarHandle y) Asserts that substring x contains substring y.    
OvertFstHandle var_equals (VarHandle x, VarHandle y) Asserts that substrings x and y are equal.    
OvertFstHandle var_starts_simultaneously (VarHandle x, VarHandle y) Asserts that substrings x and y are equal.    
OverFstHandle var_ends_simultaneously (VarHandle x, VarHandle y) Asserts that substrings x and y are equal.    
OvertFstHandle var_starts_before (VarHandle x, VarHandle y) Asserts that substring x starts before substring y.    
OvertFstHandle var_ends_before (VarHandle x, VarHandle y) Asserts that substring x ends before substring y.    
OvertFstHandle var_comes_before (VarHandle x, VarHandle y) Asserts that substring x occurs ends before substring y starts.    
OvertFstHandle var_has_overlap (VarHandle x, VarHandle y) Asserts that substring x and substring y are not disjoint (Hulden 2008).    
OvertFstHandle var_is_prefix_of (VarHandle x, VarHandle y) Asserts that substring x is prefix of y.    
OvertFstHandle var_is_suffix_of (VarHandle x, VarHandle y) Asserts that substring x is suffix of y.    
OvertFstHandle rename_var (VarHandle x, VarHandle y, OvertFstHandle ψ) Makes α transformation for overt FST ψ by replacing variable x with variable y.    

Functions Supporting Auxiliary Symbols that Occur Freely in Specified Positions

General Functions

Functions That Implement Logical Connectors and Quantifiers

Type Function Comment hfst-lexc hfst-twolc
OvertFstHandle connect_with_concatenation (OvertFstHande e, OvertFstHande f) Combine two overt FSTs under contenation.    
OvertFstHandle connect_with_and (OvertFstHande e, OvertFstHande f) Combine two overt FSTs under conjunction.    
OvertFstHandle connect_with_or (OvertFstHande e, OvertFstHande f) Combine two overt FSTs under disjunction.    
OvertFstHandle connect_with_xor (OvertFstHande e, OvertFstHande f) Combine two overt FSTs under exclusive disjunction.    
OvertFstHandle connect_with_not (OvertFstHande e) Negate an overt FST.    
OvertFstHandle connect_with_arrow (OvertFstHande e, OvertFstHande f) Combine two overt FSTs with material implication.    
OvertFstHandle quantify_existentially (VarHandle m, OvertFstHandle φ) Hides diamond x in φ,
or computes (∃ x)φ(x).
   
OvertFstHandle quantify_universally (VarHandle m, OvertFstHandle φ) Restrict x to all substrings in φ by evaluating
    Σ* <x> Σ* <x> Σ*  =x>  φ
or computes (∀ x)φ(x).
   

Functions That Construct, Combine and Compile GR Rules

Type Function Comment hfst-lexc hfst-twolc
OvertFstPair gr_construct (OvertFstHande e, OvertFstHande f) Combine two overt FSTs for generalized restriction operator.    
OvertFstPair gr_intersect (OvertFstPair gr1, OvertFstPair gr2) Combine two generalized restrictions under intersection.    
OvertFstPair gr_intersect_coherently (OvertFstPair gr1, OvertFstPair gr2) Combine two generalized restrictions under coherent intersection.    
OvertFstHandle gr_compile (OvertFstPair g, VarHandle x) Compiles
    generalized restriction φ =x> ψ or
    logical formula (∀ x)( φ(x) → ψ(x) )
where (φ,ψ)=g.
   
OvertFstHandle gr_compile_parallel (OvertFstPair g, VarSetHandle X) Compile
    generalized restriction φ =x1,...,xn> ψ or
    logical formula (∀ x1,...,xn)( φ(x1,...,xn) → ψ(x1,...,xn))
where (φ,ψ)=g and x1,...,xn ∈ X.
   
TransducerHandle gr_compile_final (OvertFstPair g) Compile
    generalized restriction φ =x1,...,xn> ψ or
    logical formula (∀ x1,...,xn)( φ(x1,...,xn) → ψ(x1,...,xn))
where (φ,ψ)=g.
   

-- AnssiYliJyra - 13 Oct 2008

Topic revision: r3 - 2009-09-30 - ErikAxelson
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback