主权项 |
1. A method, comprising:
determining, by a device, text to be categorized; determining, by the device, a set of categories for categorizing one or more portions of the text; determining, by the device, a set of rules for categorizing the one or more portions of the text,
at least one rule, of the set of rules, identifying:
a category of the set of categories,at least two text patterns to be used to categorize the one or more portions of the text into the category, anda relationship, between the at least two text patterns, to be used to categorize the one or more portions of the text into the category; determining, by the device, that a text portion, of the one or more portions of the text, includes the at least two text patterns and the relationship between the at least two text patterns; categorizing, by the device, the text portion into the category based on determining that the text portion includes the at least two text patterns and the relationship between the at least two text patterns; and providing, by the device, information identifying the text portion and the category based on categorizing the text portion into the category. |