does gensim Word2Vec include neighboring sentences in context?
Gensim's Word2Vec works on whatever chunks of text you provide to it. So, when you supply ['wooden', 'desk', 'cherry'] and ['long', 'sleeve', 'shirt', 'cotton'] as separate items in the training corpus, no training windows will blend them together.
(Separately: in sufficiently-large training sets, it'd be unlikely for such 'bleed-over' to make much difference, even if it did happen. It'd be a little bit of random-interference, since the source data doesn't truly imply those words appeared together. But the curve-balls it throws the training should be swamped out by the 'real signal' in true co-occurrences.)
I am working to calculate similarities of labels of materials. Where each label might have 1-10 words in it. I am using gensim word2vec to find cosine similarities.
My approach is simply to treat each label as a 'sentence' and tokenize each word.
example:
labels = ['wooden desk cherry', 'long sleeve shirt cotton',..]
sentences = [['wooden', 'desk', 'cherry'], ['long', 'sleeve', 'shirt', 'cotton'],..]
My question is does word2vec take neighboring sentences into its context. for example if i am using a window = 2, when looking at words around 'long', will 'cherry' be included or only 'sleeve'.
If neighboring sentences are considered is there a way to only consider words within the target words sentence.
Thanks for any help. I have read the Word2Vec documentation and couldn't find any information about this.