TBD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" -*- coding: utf-8 -*- | |
# | |
# Sample program for language detection | |
# Link to original paper https://www.kleemans.ch/letter-frequency | |
# | |
# How to run | |
# 1. add environment PYTHONIOENCODING="UTF-8" | |
# 2. python language_detect.py < letter_frequency.csv | |
# | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Word embeddings with GloVe50 | |
# This demo aims to show up the technique, alternative to famous TFIDF. | |
# Helper functions: | |
# read_glove_vecs - reads GloVe data from glove.6B.50d.txt into word_to_vec_map | |
# sentence_to_avg - converts sentence to its vector representation (50 dimensional in case of using glove.6B.50d | |
# as word embeddings data source)source | |
from sklearn.metrics.pairwise import cosine_similarity | |
def read_glove_vecs(glove_file): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.