Skip to content

Anton-Mrakin/AlertTermExtraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlertTermExtraction

Matches query terms against alert content using the Prewave test API.

How it works

  1. Fetches query terms once from testQueryTerm
  2. Fetches alerts N times from testAlerts (default: 100 — the endpoint returns different data each call)
  3. For each alert, checks whether any query term occurs in a content field of the same language
  4. Emits unique alertId,termId pairs — no duplicates across iterations

Matching rules (per keepOrder flag):

  • keepOrder=true — all words of the term must appear consecutively in that order
  • keepOrder=false — all words must appear somewhere in the text, in any order

Run

mvn package -DskipTests
java -DapiKey=<your-key> -jar target/AlertTermExtraction-1.0-SNAPSHOT.jar

Or pass the key as an environment variable:

API_KEY=<your-key> java -jar target/AlertTermExtraction-1.0-SNAPSHOT.jar

Override iteration count:

java -DapiKey=<your-key> -Diterations=50 -jar target/...jar

Test

Unit tests (no API key needed):

mvn test

Integration test against the real API:

mvn test -Dtest=ExtractionIntegrationTest -DapiKey=<your-key>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages