Versions Compared

Key

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

...

So for example, if we had a separate KEE project for identifying specific products sold by the same company, we would have a second KEE project folder for the other KEE project.  

Setting up the KEE Project folder

For this project, we will do all of our work in a new folder called kee_salespeople. Within this folder we want to create the following content:

  • salespeople.csv file - This is the file that contains the list of all the salespeople we want to identify. 
  • config.json file - This is the configuration file for the KEE project that describes how we want the KEE project to operate. You can customize the rules for each KEE project and make tweaks to how entities are identified by changing this file.
  • fixtures/ folder - This contains the test items that we will use to configure the KEE project

Setting up the initial Configuration

The full reference for the KEE project configuration file can be found here: LINK

To start, we want to make sure to point the KEE configuration to our list of entities by adding a source to the config.json file as shown below:

Code Block
{
    "sources": {
        "salespeople": {
            "dsn": "csv:///salespeople.csv"
        }
    }
}

What the above code does is create a new source of known entities called "salespeople", and for this source we set the data source name ("dsn") to point to the csv file salespeople.csv which is located in the same folder as the config.json file.

Creating a strategy

Once we have the KEE project pointed to the list of known entities, we want to create our first strategy for recognizing known entities within the text.

We do this by adding an entry to the "sources" section of the config.json file, as shown below:

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

 

Testing a KEE project

Deploying a KEE project