OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-learn / version-one / run-config / dict-combined / storage.dict

123 lines · dict ref:
%
% Configuration file for an Atomspace-based dictionary. It will use
% any available data in the AtomSpace to perform parsing. Disjunct
% data is preferred, if it is available; else word-pair data is used.
% if even that is not available, random planar parsing will be done.
%
% All config values can be left as-is; nothing here needs tweaking.
%
% No StorageNode is used; the config here assumes that we will be
% working within an AtomSpace where everything needed has already
% been loaded. The Link Parser works great with dynamically loaded
% atoms; i.e. it will pull them from Storage if Storage is given.
% What is missing/cinomplete is on-the-fly computation of MI.
%
% See the `demo-atomese/storage.dict` file in the main Link Grammar
% distribution for detailed documentation.

% -----------------------
% Boilerplate: The dictionary is for English, the English locale
% should be used, and a version number.

#define dictionary-lang           en;
#define dictionary-locale         en_US.UTF-8;
#define dictionary-version-number 5.12.3;

#define disable-downcasing true;
#define max-disjunct-cost 8.5;

% -----------------------
% Disjunct config.

% Disjuncts with a cost larger than this will not be used during
% parsing. This can be over-ridden with the !cost-max parser option.
% This applies both to the available disjuncts, and the ones created
% dynamically, from pairs.
%
% Location where disjunct MI are stored. The cost will be obtained
% from the floating point value located at the `cost-key` Value on the
% Sections. It's assumed that this is a FloatValue, which is a vector;
% the index specifies the location in this vector.
#define cost-key "(Predicate "*-Mutual Info Key cover-section")";
#define cost-index 1;

% Sections whose MI is less than the cutoff will not be added
% to the local dictionary.
#define cost-cutoff 4.0;

% Sections with a missing MI will be assigned this default. To ignore
% sections with a missing MIt, set it to some value less than
% `cost-cutoff`.
#define cost-default 4.01;

% Linear scale and offset.
% The cost will be y=mx+b where m==`cost-scale` and b==`cost-offset`
% and x== the value fished out of the vector above.
% The minus sign because the MI is better, the more positive it is,
% while LG costs are better, the less positive they are.
#define cost-scale -0.25;
#define cost-offset 3.0;

% -----------------------
% Pair config.
%
% If disjuncts are not directly available, they can be created on the
% fly, from word-pairs. The settings below are analogous to those above,
% but are for word-pairs.

#define pair-predicate "(BondNode "ANY")";
#define pair-key "(Predicate "*-Mutual Info Key-*")";
#define pair-index 1;
#define pair-cutoff 4.0;
#define pair-default 4.01;
#define pair-scale -0.25;
#define pair-offset 3.0;

% Keep in mind that the parser ranks parses from lowest to highest cost.
% If word-pair links have a negative cost, the parser is incentivized to
% add as many of these as possible, while still resulting in a planar
% graph with many loops. Viz, "Maximal Planar Graphs" (MPG). Conversely,
% if word-pair links have a positive cost, Minimal Spanning Trees (MST)
% will be created (minimizing the total cost.)

% Default cost for `ANY` link types. The `ANY` link type is meant to
% provide a desperate, last-chance opportunity to link to a word that
% does not appear in any disjuncts or word-pairs.  Thus, its given some
% high cost, so that it is not used when other links are available.
#define any-default 2.6;

% -----------------------
% Bool flags to enable/disable disjuncts, pairs, and random links.

% Use sections (disjuncts), if they are available.
#define enable-sections 1;

% Supplement existing sections with optional links.
% If set to 2 or more, then that many extra optional links will be used.
% If sections are not enabled, then this parameter has no effect
#define extra-pairs 1;

% Same as above, but add an optional `ANY` link.
#define extra-any 1;

% Create expressions that consist entirely of word-pair relationships.
% Default of up to four connectors.
#define pair-disjuncts 4;

% Supplement the above with additional connectors of type "ANY".
% This has no effect, if `pair-disjuncts` is set to zero.
#define pair-with-any 1;

% Create expressions that consist entirely of "ANY" link-types.
#define any-disjuncts 0;

% Enable the automatic generation of <UNKNOWN-WORD>. It will be
% automatically added to the dictionary, with multi-ANY connectors
% on it. The ANY connectors will be used, irresepctive of the other
% `any` setting above.
#define enable-unknown-word 1;

% -----------------------
% Bogus entry. Cannot be empty.
foo: UNITS+;