Slot-filling with CRFs
In Chapter 8, we discussed the popular application of slot-filling, and we used the spaCy rule engine to find slots for the restaurant search application shown in Figure 8.9. This required writing rules for finding the fillers of each slot in the application. This approach can work fairly well if the potential slot fillers are known in advance, but if they aren’t known in advance, it won’t be possible to write rules. For example, with the rules in the code following Figure 8.9, if a user asked for a new cuisine, say, Thai, the rules wouldn’t be able to recognize Thai as a new filler for the CUISINE
slot, and wouldn’t be able to recognize not too far away as a filler for the LOCATION
slot. Statistical methods, which we will discuss in this section, can help with this problem.
With statistical methods, the system does not use rules but looks for patterns in its training data that can be applied to new examples. Statistical methods...