官术网_书友最值得收藏!

Recognizing entities

Now, let's talk about entities. In many of the examples I ended up using to train Watson, I included references to specific things. These are some examples I used:

  • How much do I have in checking?
  • What transactions have I done recently?
  • Put money in my wife's account
  • Pay my power bill

We can look at one of the preceding examples in the following screenshot:

Checking, I, recently, my wife, and my power bill are all examples of entities that qualify my intent. I specifically want to know how much money I have in my checking account—not just any account. I want to know about transactions that I have performed recently—not those that others have performed, and certainly not those that my wife may have made a while ago (note that statements such as recently and a while ago are both relative and somewhat ambiguous timeframes, requiring a certain judgement to evaluate).

So, we have to teach Watson to recognize these types of qualifications. We call those entities—essentially people, places, things, and timeframes.

There are two ways to identify entities in Watson.

The first is to go back to the intent examples you have provided. Mouse over to select the thing that represents an entity, for example power bill, and create or identify the name of that entity type:

The other approach to creating entities is to go into the Entities tab on the main conversation page and press the Add entity button:

You can create an entity for PersonalRelations:

Then, you can add values for Mother, Myself, Father, Daughter, Son, Husband, and Wife, for example, along with any synonyms for each of those. Now add any other entities that you think will be relevant to conversations about banking activities. We depict a few other entities you can create here:

In this case, we have created entities for Accounts, in addition to BillingInstitutions and PersonalRelations. And, again, you can test this out with the Try it button:

Note, that Watson recognized that I intended to #Pay-Bills and to do so for my @BillingInstitution:Power Company—identified as an entity that qualifies the intent. In addition to user-defined entities, Watson also supplies a list of predefined system entities. If you select System entities tab on the main Entity page, you will see a list of them:

You can introduce system-defined entities into your application by simply turning them On.

Now we have done enough to build a very basic chatbot. We could, for example, write an application that prompted for a text utterance from a user, calling the Watson Assistant service passing in the utterance, and the service would return with a classification value and entities. You could, in your application, take that result and use it to determine the outstanding balance of the power bill, and issue a transaction to transfer that amount to the power company.

主站蜘蛛池模板: 鹤庆县| 太原市| 定安县| 海宁市| 桑日县| 龙海市| 闸北区| 安达市| 盐源县| 禹州市| 乌拉特后旗| 沙湾县| 宣武区| 芦山县| 剑阁县| 长葛市| 平乡县| 永年县| 刚察县| 南宫市| 崇阳县| 融水| 中阳县| 芜湖市| 仁寿县| 化德县| 固始县| 凌源市| 阳东县| 夏河县| 且末县| 荣成市| 大英县| 富宁县| 马山县| 厦门市| 宁安市| 永嘉县| 民勤县| 岳池县| 抚远县|