Natural language processing policies
Systems and methods for natural language processing policies are disclosed. For example, content such as a response to a user command and/or user input such as a customer review, may be analyzed to determine if the content deviates from one or more content policies and to determine a severity of the content-policy deviation(s). A system may determine a number of content-policy deviations associated with the content and whether the content includes an indicator of a person, such as a pronoun and/or a proper noun. Content that includes multiple content-policy deviations and/or that includes an indicator of a person may be determined to be more severe than other deviated content. Applications associated with deviated content may be ranked and corrective action may be taken based on the ranking.
1 . A system comprising:
one or more processors; and
non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
selecting a content policy, from among multiple content policies, to apply to content received in association with account data;
identifying a condition associated with the content policy by determining the content is associated with a predefined maturity rating, wherein the condition is associated with the predefined maturity rating;
receiving first data representing the content, the first data received based at least in part on request data sent from a device associated with the account data;
determining, based on the first data, that a phrase of the content violates the content policy;
detecting the condition from the first data; and
causing an action to be performed in association with the content based at least in part on the phrase violating the content policy and detecting the condition.
2 . The system of claim 1 , wherein:
the condition comprises the content having a predefined data type; and
detecting the condition comprises detecting that the content is of the predefined data type.
3 . The system of claim 1 , wherein:
the request data comprises audio data representing a voice command; and
causing the action to be performed comprises causing the action to be performed based at least in part on the request data comprising the audio data.
4 . The system of claim 1 , wherein:
the condition comprises receiving the first data from a predefined application; and
detecting the condition comprises detecting that the first data was received from the predefined application.
5 . The system of claim 1 , wherein:
the condition comprises the device having a predefined device type identified by the content policy; and
detecting the condition comprises determining that the device is associated with the predefined device type.
6 . The system of claim 1 , wherein:
the condition comprises receiving the request data from one or more devices associated with a predefined user profile of the account data; and
detecting the condition comprises determining that the request data was received from the device associated with the predefined user profile.
7 . The system of claim 1 , the operations further comprising determining the action to be performed based at least in part on the request data, and wherein:
the condition comprises the action being of a predefined action type; and
detecting the condition comprises determining that the action is of the predefined action type.
8 . The system of claim 1 , wherein:
the content policy comprises a first content policy of the multiple content policies;
the first content policy indicates that the action is to filter the content; and
a second content policy of the multiple content policies indicates that the action is to provide the content unfiltered.
9 . The system of claim 1 , the operations further comprising determining, based at least in part on the content policy, a content policy violation severity value associated with the content.
10 . A method comprising:
selecting a content policy of multiple content policies to apply to content received in association with account data;
identifying a condition associated with the content policy by determining the content is associated with a predefined maturity rating, wherein the condition is associated with the predefined maturity rating;
receiving first data representing the content, the first data received based at least in part on request data sent from a device associated with the account data;
determining that a phrase of the content violates the content policy;
detecting the condition from the first data; and
causing an action to be performed in association with the content based at least in part on the phrase violating the content policy and detecting the condition.
11 . The method of claim 10 , wherein:
the condition comprises the content having a predefined data type; and
detecting the condition comprises detecting that the content is of the predefined data type.
12 . The method of claim 10 , wherein:
the request data comprises audio data representing a voice command; and
causing the action to be performed comprises causing the action to be performed based at least in part on the request data comprising the audio data.
13 . The method of claim 10 , wherein:
the condition comprises receiving the first data from a predefined application; and
detecting the condition comprises detecting that the first data was received from the predefined application.
14 . The method of claim 10 , wherein:
the condition comprises the device having a predefined device type associated with the content policy; and
detecting the condition comprises determining that the device is associated with the predefined device type.
15 . The method of claim 10 , wherein:
the condition comprises receiving the request data from one or more devices associated with a predefined user profile of the account data; and
detecting the condition comprises determining that the request data was received from the device associated with the predefined user profile.
16 . The method of claim 10 , further comprising determining the action to be performed based at least in part on the request data, and wherein:
the condition comprises the action being of a predefined action type; and
detecting the condition comprises determining that the action is of the predefined action type.
17 . The method of claim 10 , wherein:
the content policy comprises a first content policy of the multiple content policies;
the first content policy indicates that the action is to filter the content; and
a second content policy of the multiple content policies indicates that the action is to provide the content unfiltered.
18 . The method of claim 10 , further comprising determining, based at least in part on the content policy, a content policy violation severity value associated with the content.