コード例 #1
0
def calc_delusions(text):
    default_delusion_categories = [
        'time',
        'self',
        'surveillance',
        'unfair',
        'mind_control',
        'alien',
    ]

    remove_delusions()
    add_delusions(default_delusion_categories)
    concept_dict = get_concepts_from_files()

    basics = calc_basics(text)
    smart_ave_dict = index_input(basics, concept_dict)
    return (smart_ave_dict)
コード例 #2
0
def index_string(text, concept_dict):
    basics = compute_basics_text(text, 'all')
    smart_ave_dict = index_input(basics, concept_dict)
    pprint(smart_ave_dict)
コード例 #3
0
def index_file(file_name, concept_dict):
    basics = compute_basics(file_name)
    smart_ave_dict = index_input(basics, concept_dict)
    print(file_name)
    pprint(smart_ave_dict)
コード例 #4
0
def delusion_index_string(text, concept_dict):
    basics = compute_basics_text(text, 'all')
    return index_input(basics, concept_dict)
コード例 #5
0
def delusion_index_file(file_name, concept_dict):
    basics = compute_basics(file_name)
    return index_input(basics, concept_dict), basics