Feature 2 Backend Implementation
added two apis for the feature to highlight concerning statements and fixed an existing issue with analyzing policy.
-
GET
/highlights
: identifies statements of concern. Such sentences are wrapped around by the pair [CS492-UID-START-[number here]] and [CS492-UID-END-[number here]]. [number here] is replaced by an actual number from 1 to 3. 1 is least concerning, but still concerning enough to give a rating. 2 is more concerning. 3 is most concerning.INPUT: The privacy policy.
OUTPUT: The privacy policy repeated, word for word, but with [CS492-UID-START-[number here]]...[CS492-UID-END-[number here]] added in between.
-
GET
/highlight-details
: provides details on why a specific statement was rated as 1, 2 or 3. Explains why it is concerning.INPUT: A single privacy policy statement, like this: "[CS492-UID-START-3] We will steal your data and sell it to companies.[CS492-UID-END-3]"
OUTPUT: A maximum 10 line response.