Versions Compared

Key

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

...

Code Block
{
    "sources": {
        "salespeople": {
            "dsn": "csv:///salespeople.csv",
			"hierarchy": "manager -> name",
            "strategy": "salesperson_strategy"
        }
    },
    "strategies": {
        "salesperson_strategy": {
            "min_score": "0.8",
            "keywords": [
                "name",
                "position"
                ],
            "parent_keywords": [
                "name -> manager name",
                "position -> manager position"
                ]
        }
    }
}

...

We also set a few basic parameters for this new strategy, such as the minimum score required to produce a match, which we set to 0.8 (make sure that it's a number and not in quotes)

Finally, we set the keyword items to tag each match with for both the matching entity (the salesperson) and the matching parent entity (the salesperson's manager). In this case, we tag each document with the name and position of the matching entity in facets called 'name' and 'position' respectively, while we tag each document with the name and position of the matching parent entity in facets called 'manager name' and 'manager position' respectively.

...

Code Block
>> kee -v test
 
- Running fixture demo
  -    0 (  0%) correct results: []
  -    4 (100%) missedcorrect results:
        [u'Adrian Fox', u'District Manager', u'District Representative', u'Jane Doe']
  -    0 (  0%) missed results: []
  -    0 (  0%) extra results: []
- Processed 1 fixtures
  -    04 (  0%100%) correct results
  -    40 (100%  0%) missed results
  -    0 (  0%) extra results

...

Download this Example KEE Project

Amazon S3 Download Link KEEtutorial.tar.gz