def extract_tags_for_queries()

in src/kg.py [0:0]


def extract_tags_for_queries(queries):
    texts = queries[::]
    
    docs = nlp.pipe(texts, disable=["ner"])

    tags_list = []
    for doc in docs:
        tags = set()
        
        for token in doc:
            # print(token.pos_)
            if token.pos_ in ["ADJ", "PROPN", "NOUN"] and not token.is_stop:
                tags.add(token.text.strip().lower())
        
        tags_list.append(list(tags))  # Append the tags for this document
    
    return tags_list