Versions Compared

Key

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

Identifies patterns with a combination of any number of specified tokens, regardless of the surrounding tokens.


Operates On:  Lexical Items with TOKEN or SEMANTIC_TAG and other possible flags as specified below, but not on TEXT_BLOCK.

Saga_is_recognizer

Include Page
Generic Configuration Parameters
Generic Configuration Parameters

Configuration Parameters

  • Parameter
    summaryThe resource that contains the pattern database.
    namepatterns
    requiredtrue
Info

In version 1.2.2 this parameter was added:

  • Parameter
    summaryIf true the stage will prefer larger patterns
    defaulttrue
    namepreferLarge
    typeboolean
Saga_config_stage
boundaryFlagstext block split
stageFragmentation
requiredFlagstoken, semantic tag
skipFlagsskip
"patterns":"saga_provider:fragmented_patterns",
"maxRepeats": 5

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 that are semantic tags.
  • FRAGMENT- Identifies all lexical items that were created from a fragmentation pattern.
  • PROCESSED - Placed on all the tokens that compose the semantic tag.

Vertex Flags:

Info

No vertices are created in this stage


Resource Data

The resource data is a database of fragmented patterns, and the resulting semantic tags they produce.

Resource Format

The only required file is the entity dictionary. It is a series of JSON records, typically indexed by entity ID.

Description of entity

Entity JSON Format 
Anchor
resourceFormat
resourceFormat

Saga_json
TitleEntity Json Format
"tag": "{city}",
"pattern": "("how many"|"how much") {ingredient} ",
"confAdjust": 0.95
. . . additional fields as needed go here . . . 


Code Block
languagejs
themeEclipse
titleEntity JSON Format
"_id" : "KGAAJGsBemSwA0nZTLXA",
"tag":["recipe"],
"pattern": "{number} {ingredient}",
"options": {
  "minTokens": 3,
  "maxTokens": 2,
  "combination": true
}
"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
    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

  • Parameter
    summaryObject with options applicable for this entity
    nameoptions
    typejson
    • Parameter
      summaryMinimum number of tokens the match must contains to be valid. The default is the number of tokens contained in each pattern.
      nameminTokens
      typeinteger
    • Parameter
      summaryMaximum number of tokens the match must contain to be valid. The default is the number of tokens contained in each pattern
      namemaxTokens
      typeinteger
    • Parameter
      summaryndicates if the given tokens can be matched in any order as long as all appear in the match. If false, the tokens must be in the order provided.
      defaulttrue
      namecombination

Include Page
Generic Resource Fields
Generic Resource Fields