Skip to content

Feature 2 Backend Implementation

Abhinav Gupta requested to merge abhinav/feature-2-API into main

added two apis for the feature to highlight concerning statements and fixed an existing issue with analyzing policy.

  1. 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.

  2. 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.

Merge request reports