This PR combines several commits from previous PRs.
New:
Support for multivariable questions! QA objects for questions involving multiple properties can now be automatically generated and answered ([PROF]'s office hours are [PROF..OfficeHours] in [PROF..Office]).
New Prof entity type. This entity replaces the existing Professors entity and is a combination of relevant information from the Professors, Sections, and OfficeHours entity. This unified entity allows answering many more fact-based questions than before.
QA objects now take a database parameter during initialization, removing top-level initialization of the database in QA.py
New QA functions for chaining database access, formatting professor office hours, and more.
Replaced q_a_pairs.csv with @richagadgil's get_all_answerable_pairs function. Note: function is no longer used directly in question_classifier.py. See build_question_classifier for explanation.
Type of change (pick-one)
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
See PRs #110 and #103. Also, multivariable question from database answered in if name==... block in nimbus.py.
Possible concerns:
Slightly different overall features generated by spacy and spacy's stopwords list.
Longer database access times for views.
TODO:
Type annotation
Checklist (check-all-before-merge)
formatting help: - [x] means "checked' and - [ ] means "unchecked"
What's New?
This PR combines several commits from previous PRs.
New:
Old (but still new):
get_all_answerable_pairs
function. Note: function is no longer used directly in question_classifier.py. Seebuild_question_classifier
for explanation.Type of change (pick-one)
How Has This Been Tested?
See PRs #110 and #103. Also, multivariable question from database answered in if name==... block in nimbus.py.
Possible concerns:
TODO:
Checklist (check-all-before-merge)
formatting help:
- [x]
means "checked' and- [ ]
means "unchecked"[ ] I documented my code according to the Google Python Style Guide
[ ] I ran
./build_docs.sh
and the docs look fine[ ] I ran
./type_check.sh
and got no errors[x] I ran
./format.sh
because it automatically cleans my code for me 😄[ ] I ran
./lint.sh
to check for what "format" missed[ ] I added my tests to the
/tests
directory[ ] I ran
./run_tests.sh
and all the tests pass