Select Language

Open Dataset

クォラスのデータ中の独特な単語のピクルス

クォラスのデータ中の独特な単語のピクルス

1.04M
206 hits
0 likes
0 downloads
0 discuss
Earth and Nature Classification

Data Structure ? 1.04M

    Data Structure ?

    *The above analysis is the result extracted and analyzed by the system, and the specific actual data shall prevail.

    README.md

    文脈 編集:2017年5月30日 Googleニュースのベクトルは、メモリマップできるため便利です。Spacyには単語距離移動メトリックがなく、またバグがあちこちにあります。GensimにはWDM(単語距離移動メトリック)があり、mmapされたword2vecファイルからそれを実行できます。すべてのLinuxユーザー…ああ、話し始めると止まらなくなります。自分のことを無視してください。このクソみたいなものを、このコンペに挑戦しようとしている初心者向けに整理しなければなりません。最初のステップ…一意の単語を取得し、次にGoogleニュースのLinux用のbzip2形式のクソファイルから一意のベクトルを取得します。 内容 -- \Kaggle\Quora_20170422\gen_sim_crap\Get_Unique_Words_in_data_v2.py TEST_FILE = os.path.join(BASE_DIR, r'testcsv', r'test.csv') 94%|█████████▍| 2345806/2500000 [00:54<00:03, 42961.02it/s] 55.024147272109985 -- len(unique_words) = 124848 謝辞 他の人の助けがなければ、私たちはここにいることはできません。何らかの謝辞や引用が必要な場合は、ここに過去の研究の引用とともに記載してください。 インスピレーション import time, pickle, os from tqdm import tqdm import string OUT_FILE = r'\Kaggle\Quora_20170422\FeatureEngineering\ListofUniqueTest.pkl' BASE_DIR = r'\Documents\Kaggle\Quora_20170422' #TRAIN_FILE = os.path.join(BASE_DIR, r'traincsv', r'train.csv') TEST_FILE = os.path.join(BASE_DIR, r'testcsv', r'test.csv') def get_words(f, c2r): with tqdm(total=2500000) as pbar: for line in f: #b_string = line.replace(',', ' ') c_string = line.translate(str.maketrans({key: ' ' for key in c2r})) pbar.update() for word in c_string.split(): yield word start_time = time.time() chars_to_replace = string.punctuation + string.digits with open(TEST_FILE, encoding="utf8") as infile: unique_words = sorted(set(get_words(infile, chars_to_replace))) pickle.dump(unique_words, open(OUT_FILE, 'wb'), -1) elapsed_time = time.time() - start_time print(elapsed_time)
    ×

    The dataset is currently being organized and other channels have been prepared for you. Please use them

    The dataset is currently being organized and other channels have been prepared for you. Please use them

    Note: Some data is currently being processed and cannot be directly downloaded. We kindly ask for your understanding and support.
    No content available at the moment
    No content available at the moment
    • Share your thoughts
    Go share your ideas~~

    ALL

      Welcome to exchange and share
      Your sharing can help others better utilize data.
    Points:0 Go earn points?
    • 206
    • 0
    • 0
    • collect
    • Share