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.
This PR creates two API endpoints:
all_frequency_analyses
to get all of the existing frequency analyses andadd_frequency_analysis
to run an analysis based on the givencorpus_id
andgender_ids
or it retrieves an existing entry from theFrequencyAnalysis
model.Note: We tried creating a
FrequencyAnalysisManager
and perform therun_analysis
method in there but we ran into an issue of circular imports so we ultimately called therun_analysis
method directly in the API endpoint.