<commit_before>#!/usr/bin/env python

import nltk

class WNSearch():
    """Class to perform searches in WordNet"""
    def __init__(self):
        nltk.download('wordnet')

    def suggest_terms(self,query_word):
        from nltk.corpus import wordnet as wn
        term_dict={}
        for syn in wn.synsets(query_word):
            term_dict[syn._name.split('.')[0]]=1
            for hyp in syn.hypernyms():
                term_dict[hyp._name.split('.')[0]]=1
        return term_dict<commit_msg>simplify import in WNSearch<commit_after>#!/usr/bin/env python

import nltk
from nltk.corpus import wordnet as wn

class WNSearch():
    """Class to perform searches in WordNet"""
    def __init__(self):
        nltk.download('wordnet')

    def suggest_terms(self,query_word):
        term_dict={}
        for syn in wn.synsets(query_word):
            term_dict[syn._name.split('.')[0]]=1
            for hyp in syn.hypernyms():
                term_dict[hyp._name.split('.')[0]]=1
        return term_dict
{'fraction_non_alphanumeric': 0.12871287128712872, 'fraction_numerical': 0.007920792079207921, 'mean_word_length': 2.5851063829787235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6494902', 'n_tokens_mistral': 343, 'n_tokens_neox': 329, 'n_words': 74}