dhmit / gender_analysis_web

4 stars 0 forks source link

Create API endpoints for Frequency Analysis #55

Open phuang00 opened 3 years ago

phuang00 commented 3 years ago

This PR creates two API endpoints: all_frequency_analyses to get all of the existing frequency analyses and add_frequency_analysis to run an analysis based on the given corpus_id and gender_ids or it retrieves an existing entry from the FrequencyAnalysis model.

Note: We tried creating a FrequencyAnalysisManager and perform the run_analysis method in there but we ran into an issue of circular imports so we ultimately called the run_analysis method directly in the API endpoint.