Added training functionality

- Training data for NB
- Putting needed data into global variables so they don't need to be
loaded each time a query is made
-