def main(): # Call the herb symptom dictionary. herb_symptom_dct = file_operations.get_medicine_dictionary_file() dictionary_herbs = list(set(herb_symptom_dct.keys())) # List of lists. We flatten this list. ds = herb_symptom_dct.values() dictionary_symptoms = set(list( [item for sublist in ds for item in sublist])) # Get the patient record dictionary, and stem it. patient_dct = file_operations.get_patient_dct() stemmed_patient_dct = stem_patient_records(patient_dct, dictionary_herbs, dictionary_symptoms) write_patient_dct(stemmed_patient_dct)
def main(): patient_dct = file_operations.get_patient_dct() frequent_herbs = get_frequent_herbs(patient_dct)