DFS Tools

Prolog files

coals.pl  -- COALS
coals_binary_vectors/3CoalsVectors is a list of (Word,Vector) tuples, where Vector is a binary COALS vector, derived from a DCG using a WindowType of WindowSize.
coals_padded_binary_vectors/4CoalsVectors is a list of (Word,Vector) tuples, where Vector is a binary COALS vector, derived from a DCG using a WindowType of WindowSize.
coals_vectors/3CoalsVectors is a list of (Word,Vector) tuples, where Vector is a real-valued COALS vector, derived from a DCG using a WindowType of WindowSize.
coals_write_vectors/2Writes a list of (Word,Vector) Tuples to File in CSV format.
dfs_discourse.pl  -- Discourse generation
dfs_discourse/1SenSemTuples is a list of all discourse sentence-semantics mappings.
dfs_discourse_semantics_mappings/3Mappings is a list of lists of (Sen,Sem,[SenVecs],[SemVec]) quadruples.
dfs_map_discourse_onto_semantics/4Mappings is a list of quadruples (Sen,Sem,[SenVecs],[SemVec]), where SenVecs is a word-by-word vector-based mapping of a sentence (Sen) onto single SemVec, a vector representation of its semantics (Sem).
dfs_map_semantics_onto_discourse/4Mappings is a list of quadruples (Sen,Sem,[SemVec],[SenVecs]), where SemVec is a vector representation of a sentence semantics (Sem), and SenVecs a word-by-word vector-based representation of the corresponding sentence (Sen).
dfs_semantics_discourse_mappings/3Mappings is a list of lists of quadruples (Sen,Sem,[SemVec],[SenVecs]).
dfs_information_theory.pl  -- Information theory
dfs_semantic_delta_entropy/4Semantic entropy delta for a word given a prefix.
dfs_semantic_entropy/3Semantic entropy for a prefix.
dfs_semantic_surprisal/4Semantic suprisal for a word given a prefix.
dfs_syntactic_delta_entropy/3Syntactic entropy delta for a word given a prefix.
dfs_syntactic_entropy/2Syntactic entropy for a prefix.
dfs_syntactic_surprisal/3Syntactic surprisal of a word given a prefix.
dfs_delta_entropy/3Entropy delta of P given Q, where P and Q are either vectors or formulas.
dfs_entropy/2Entropy of P, where P is either a vector or a formula.
dfs_surprisal/3Surprisal of P given Q, where P and Q are either vectors or formulas.
dfs_interpretation.pl  -- Model-theoretic interpretation
dfs_assign/4Updates the assignment function G of Model with variable Assignments, yielding assignment function G'.
dfs_constant_instantiations/2ConstantInstantiations is a list of all constant instantiations in Model.
dfs_entities/2Entities is a list of N model entities.
dfs_formula_to_fol/2Convert FOL and/or DRS formula into first-order logic formula.
dfs_formulas_to_fol/2Convert FOL and/or DRS formulas into first-order logic formulas.
dfs_init_g/2Initializes the assignment function G :: Var -> Um.
dfs_interpret/2Evaluates the truth value of Formula in Model, given an initial assignment function G.
dfs_interpret/3Evaluates the truth value of Formula in Model, given the assignment function G.
dfs_term_instantiations/3TermInstantiations is a list of all constant and variable instantiations in Model.
dfs_terms_to_entities/3Maps Terms into Entities (or vice versa), given their instantiations.
dfs_variables/1Variables is a list of variables.
dfs_io.pl  -- IO
dfs_pprint_constraints/0Pretty print model constraints.
dfs_pprint_entailments/1Pretty print entailments.
dfs_pprint_formula/1Pretty print a first-order logic formula.
dfs_pprint_matrix/1Pretty print ModelMatrix.
dfs_pprint_model/1Pretty print a model.
dfs_pprint_propositions/1Pretty print the propositions of Model.
dfs_read_matrix/2Read ModelMatrix from File.
dfs_read_models/2Reads ModelSet from File.
dfs_write_matrix/2Write ModelMatrix to File.
dfs_write_models/2Writes ModelSet to File.
dfs_logic.pl  -- First-order Logic
dfs_complement/2ComplementFormula specifies the falsehood conditions of Formula.
dfs_conj_vector/3ConjVector is the conjunction (component-wise product) of Vector1 and Vector2.
dfs_conjoin/2True if Conjunction is a logical conjunction of the formulas in FormulaSet.
dfs_disjoin/2True if Disjunction is a logical disjunction of the formulas in FormulaSet.
dfs_entailment/3A formula P entails a formula Q (P |= Q) iff Q is true in every model that satisfies P.
dfs_logical_equivalence/3A formula P is logically equivalent to formula Q iff [[P]]^M,g = [[Q]]^M,g for all models M and variable assignments g.
dfs_satisfiability/2A formula P is satisfiable iff P is true in at least one model M.
dfs_validity/2A formula P is valid (|= P) iff P is true (not false) in all models.
dfs_main.pl  -- Distributional Formal Semantics
dfs_main/0Module entry point.
dfs_version_major/1Major version number.
dfs_version_minor/1Minor version number.
dfs_version_patch/1Patch version number.
dfs_probabilities.pl  -- Probabilities
dfs_cond_probability/3Conditional probability of P given Q, where P and Q are either vectors or formulas.
dfs_conj_probability/3Conjunction probability of P and Q, where P and Q are either vectors or formulas.
dfs_inference_score/3Inference score of P from Q, where P and Q are either vectors or formulas.
dfs_prior_probability/2Prior probability of P, where P is either a vector or a formula.
dfs_sampling.pl  -- Model sampling
dfs_sample_model/1Sample a model from the world specificiations.
dfs_sample_models/2ModelSet is a set of NumModels sampled models.
dfs_sample_models_mt/3ModelSet is a set of NumThreads * NumModels sampled models.
dfs_semantics.pl  -- DFS semantics
dfs_coordinates/2Coordinates designates the point in space in between the elements of Interpretation.
dfs_entailments/3Entailments is a set of (Element,AtomicProps) tuples, such that each AtomicProps is a list of atomic propositions entailed by the corresponding Element in Interpretation.
dfs_semantics/3Derives an Interpretation (a set of points in DFS space) for Formula given ModelSet.
dfs_sentences.pl  -- Sentence generation
dfs_localist_word_vectors/1WordVectors is a list of tuples (Word,Vector) where Vector is a localist vector representation for each Word generated.
dfs_map_semantics_onto_sentence/4Mapping is a quadruple (Sen,Sem,[SemVec],[SenVecs]), where SemVec is a vector representation of a sentence semantics (Sem), and SenVecs a word-by-word vector-based representation of the corresponding sentence (Sen).
dfs_map_sentence_onto_semantics/4Mapping is a quadruple (Sen,Sem,[SenVecs],[SemVec]), where SenVecs is a word-by-word vector-based mapping of a sentence (Sen) onto single SemVec, a vector representation of its semantics (Sem).
dfs_map_sentence_onto_sentence/4Mapping is a quadruple (Sen,Sem,[InSenVecs],[OutSenVecs]), where InSenVecs and OutSenVecs are word-by-word vector-based representations of the corresponding sentence (Sen).
dfs_prefix_continuations/2SemSenMappings is a list of all tuples (Sen,Sem), where sentence Sen is a possible continuation of Prefix, and Sem its corresponding FOL semantics.
dfs_prefix_frequency/2Frequency is the occurence frequency of sentence Prefix.
dfs_semantics_sentence_mappings/3Mappings is a list of quadruples (Sen,Sem,[SemVec],[SenVecs]).
dfs_sentence_frequency/2Frequency is is the occurrence frequency of Sentence.
dfs_sentence_semantics_mappings/3Mappings is a list of quadruples (Sen,Sem,[SenVecs],[SemVec]).
dfs_sentence_sentence_mappings/3Mappings is a list of quadruples (Sen,Sem,[InSenVecs],[OutSenVecs]).
dfs_sentences/1SenSemTuples is a list of all sentence-semantics mappings generated.
dfs_words/1Words is the set of all lexical items generated.
dfs_vector_space.pl  -- Vector space
#>@/2Infix operator for dfs_matrix_to_models/2.
@>#/2Infix operator for dfs_models_to_matrix/2.
dfs_matrix_to_models/2Convert a vector space into a set of models.
dfs_model_to_vector/2ModelVector is a set of tuples (AtomicProp,State) representing the State of each atomic proposition AtomicProp in Model.
dfs_models_to_matrix/2Convert a set of models into a vector space.
dfs_vector/3A formula P is true in a model M iff [[P]]^M,g = 1 given an arbitrary variable assignment g.
dfs_vector_to_model/2Converts ModelVector, a set of tuples (AtomicProp,State) representing the State of each atomic proposition AtomicProp, into a Model.
drt.pl
drs_interpret/3A DRS K is true in a model M iff [[K]]^M,g = 1 given an arbitrary variable assignment g.
drs_to_fol/2Translate DRS into a first-order logic Formula.
mesh.pl  -- MESH
mesh_write_atomic_prop_set/2Write a MESH-readable set of atomic propositions:.
mesh_write_set/2Write all sentence-semantics, semantics-sentence, discourse-semantics, semantics-discourse, or sentence-sentence Mappings to File in MESH-readable format.