Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Creates n-grams from TOKEN lex items of size min-max. Breaks n-grams on SPLIT_FLAGS


Operates On:  Lexical Items with TOKEN and possibly other flags as specified below.

Saga_is_recognizer
Recognizerfalse

Include Page
Generic Configuration Parameters
Generic Configuration Parameters

Configuration Parameters

  • Parameter
    summaryMinimum number of tokens for ngram
    default2
    namemin
    typeinteger
  • Parameter
    summaryMaximum of tokens for ngram
    default2
    namemax
    typeinteger
  • Parameter
    summaryIndicates additional flags of tokens to slip into ngrams
    namesplitFlags
    typestring array
  • Parameter
    summarySpecifies flags for token that will not be break into ngram
    defaultcheese
    nameignoreOnBoundaryFlags
    typestring array


Saga_config_stage
boundaryFlagstext block split
"min": 2,
"max": 3,
"splitFlags": [],
"ignoreOnBoundaryFlags": [] 

Example Output

Saga_graph
V--------------[abraham lincoln likes macaroni and cheese]--------------------V
^--[abraham]--V--[lincoln]--V--[likes]--V--[macaroni]--V--[and]--V--[cheese]--^
              ^---{place}---^           ^----{food}----^         ^---{food}---^
^----------{person}---------^           ^-----------------{food}--------------^

Output Flags

Lex-Item Flags:

  • SEMANTIC_TAG - Identifies all lexical items which are semantic tags.
  • PROCESSED - Placed on all the tokens which composed the semantic tag.
  • ALL_LOWER_CASE - All of the characters in the token are lower-case characters.
  • ALL_UPPER_CASE - All of the characters in the token are upper-case characters (for example, acronyms).
  • ALL_DIGITS - All of the characters in the token are digits (0-9)
  • TITLE_CASE - The first character is upper case, all of the other characters are lower case.
  • MIXED_CASE - Handles any mixed upper & lower case scenario not covered above.
  • TOKEN - All tokens produced are tagged as TOKEN 
  • CHAR_CHANGE -  Identifies the vertex as a change between character formats
  • HAS_DIGIT - Tokens produced with at least one digit character are tagged as HAS_DIGIT 
  • HAS_PUNCTUATION - Tokens produced with at least one punctuation character are tagged as HAS_PUNCTUATION. (ALL_PUNCTUATION will not be tagged as HAS_PUNCTUATION)
  • LEMMATIZE- All words retrieved will be marked as LEMMATIZE
  • NUMBER - Flagged on all tokens which are numbers according to the rules above.
  • TEXT_BLOCK - Flags all text blocks.
  • STOP_WORD- All matched stop words will be marked as STOP_WORD
  • WEIGHT_VECTOR - Identifies the tag as a weight vector representation of a sentence
  • BANK- Identifies a Bank account number.
  • ABA- Account number with ABA format.
  • BIC- Account number with BIC format.
  • IBAN- Account number with IBAN format.
  • ORIGINAL - Identifies that the Lex-Items produced by this stage are the original, as written, representation of every token (e.g. before normalization)
  • SSN - Identifies a Federal ID number
  • GEONAME - Identifies a geographical location name
  • NGRAM - All tokens produced are tagged as NGRAM

Vertex Flags:

Info

No vertices are created in this stage

  • ALL_PUNCTUATION - Identifies the vertex as all token
    • The default flag if no "splitFlag" is present.
  • <splitFlag> - Defines an alternative flag to ALL_PUNCTUATION, if desired (see above)
  • CHAR_CHANGE -  Identifies the vertex as a change between character formats
  • TEXT_BLOCK_SPLIT - Identifies the vertex as a split between text blocks.
  • OVERFLOW_SPLIT - Identifies that an entire buffer was read without finding a split between text blocks.
    • The current maximum size of a text block is 64K characters.
    • Text blocks larger than this will be arbitrarily split, and the vertex will be marked with "OVERFLOW_SPLIT"\
  • ALL_WHITESPACE - Identifies that the characters spanned by the vertex are all whitespace characters (spaces, tabs, new-lines, carriage returns, etc.)

Resource Data

Description of resource.

Resource Format

Saga_json
TitleEntity Json Format
"_id" : "KGAAJGsBemSwA0nZTLXA",
"tag": "recipe",
"pattern": "("how many"|"how much") {ingredient} ",
"confAdjust": 0.95

. . . additional fields as needed go here . . . 
Note
  • Multiple entries can have the same pattern. If the pattern is matched, then it will be tagged with multiple (ambiguous) entry IDs.
  • Additional fielded data can be added to the record; as needed by downstream processes.

Fields

  • Parameter
    summaryWhat to show the user when browsing this entity
    namedisplay
    requiredtrue
  • Parameter
    summaryTag which will identify any match in the graph, as an interpretation
    nametag
    requiredtrue
    • These will all be added to the interpretation graph with the SEMANTIC_TAG flag.

      Tip

      Tags are hierarchical representations of the same intent. For example, {city} → {administrative-area} → {geographical-area}

  • Parameter
    summaryPattern to match in the content
    namepattern
    requiredtrue

Include PageGeneric Resource FieldsGeneric Resource Fields