Giter Club home page Giter Club logo

spherical-text-embedding's People

Contributors

yumeng5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spherical-text-embedding's Issues

[Question] About subwords and bpe tokenization approach

Thanks a lot for this works.
According to function ReadWord-
https://github.com/yumeng5/Spherical-Text-Embedding/blob/master/jose.c#L60

a word is defined as a sequence of characters with some delimiter (tab, space, etc.). Is it possibile to customize this approach with subwords like in fastText - https://github.com/facebookresearch/fastText/blob/master/src/dictionary.cc#L172

or some other approach like BPE. SentencePiece could be a way - https://github.com/google/sentencepiece

In this last case it would mean that we are going to replace each word (or better each BPE subword) with a unique index (BPE ids), so we need a encoding and later a decoding phase.

[Question] What does '<\s>' in vocabulary means?

Hi, yumeng, Thanks for your interesting work!
After running your code, I seem got a special word in the generated vocabulary and its frequence is equal to the number of my documents. Does this mean '\n' or something else? Does this influence the training ? Thank you in advance.

Is it applicable to other data?

Hi,

Is it applicable to other datasets such as router and webkb?

If possible, I wonder if the parameter setting is the same.

If i need to set other parameters, I would appreciate it if you could let me know how to set them.

thank you!

Paper to code mapping

Hi, thanks for publishing the code for this paper.

Iโ€™m trying to understand how the lines 514 to 597 map on to the update rule you laid out in Figure (7) in the paper. Is there any further explanation you could offer as to how the variables match up? Particularly what variables f and h represent and how the cosine calculations are being made.

Unbounded write

In src/jose.c:

  if ((i = ArgPos((char *) "-train", argc, argv)) > 0) strcpy(train_file, argv[i + 1]);
  if ((i = ArgPos((char *) "-save-vocab", argc, argv)) > 0) strcpy(save_vocab_file, argv[i + 1]);
  if ((i = ArgPos((char *) "-read-vocab", argc, argv)) > 0) strcpy(read_vocab_file, argv[i + 1]);
  if ((i = ArgPos((char *) "-load-emb", argc, argv)) > 0) strcpy(load_emb_file, argv[i + 1]);
  if ((i = ArgPos((char *) "-debug", argc, argv)) > 0) debug_mode = atoi(argv[i + 1]);
  if ((i = ArgPos((char *) "-alpha", argc, argv)) > 0) alpha = atof(argv[i + 1]);
  if ((i = ArgPos((char *) "-word-output", argc, argv)) > 0) strcpy(word_emb, argv[i + 1]);
  if ((i = ArgPos((char *) "-context-output", argc, argv)) > 0) strcpy(context_emb, argv[i + 1]);
  if ((i = ArgPos((char *) "-doc-output", argc, argv)) > 0) strcpy(doc_output, argv[i + 1]);

Usage of strcpy here with an input from argv might overflow in the destination... perhaps switch to strncpy

Python package (bindings)

Hi!

Would you be interested in packaging your code into python bindings and making it public via pip? :) I would love to contribute but I just want to know whether it's something you would like to pursue.

Cheers!

Segmentation Fault

Hi,

I'm trying to train new embeddings with your code on a corpus with approximately 4B tokens but the code gives me a segmentation fault right after reading the corpus and showing the number of tokens. I'm using ~200G of RAM. Do I need to use more memory? or could it be another issue. For reference, word2vec and fasttext trained just fine on this corpus.

Thanks in advance!

Experiment setting

Hi,

I ran run.sh and get_avg_emb to get the 20newsgroups embedded file.

but, After embeddings, clustering was run, but it does not perform as well as the paper says.

How can I get an embedded file with that performance?

OOV problem

Hi there,
Is any suggestion to solve OOV problem? Should I using random value for it?
I didn't find tag like '' in vocab list but there is a 'unk' word

uSIF vs Averaging

I noticed that you are calculating sentence embedding using an average of the individual word vectors when performing clustering, etc. Did you happen to evaluate whether SIF or uSIF would be advantageous over averaging?

400D and 500D Spherical embeddings for NER

Hello, thanks for your interesting paper. I used your released embeddings in our standard NER architecture to see if they are useful for an NER downstream task. You can see the comparison against other approaches on CoNLL-03. As the table shows, F1 score increases with more dimensions to the point of being comparable to vanilla GloVe. It would be interesting to see if this trend continues with dimensions higher than 300D and if at higher dimensionality it beats vanilla GloVe.

Would you be interested in also releasing spherical embeddings trained over the same data / parameters with 400D and 500D? If so, I'll test and report the numbers back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.