{"action":"created","issue":{"url":"https://api.github.com/repos/explosion/spaCy/issues/1740","repository_url":"https://api.github.com/repos/explosion/spaCy","labels_url":"https://api.github.com/repos/explosion/spaCy/issues/1740/labels{/name}","comments_url":"https://api.github.com/repos/explosion/spaCy/issues/1740/comments","events_url":"https://api.github.com/repos/explosion/spaCy/issues/1740/events","html_url":"https://github.com/explosion/spaCy/issues/1740","id":283137277,"number":1740,"title":"en_vectors_web_lg and en_core_web_lg are not considering \"meanings of words in context\"","user":{"login":"madhusudhannsn","id":12062385,"avatar_url":"https://avatars1.githubusercontent.com/u/12062385?v=4","gravatar_id":"","url":"https://api.github.com/users/madhusudhannsn","html_url":"https://github.com/madhusudhannsn","followers_url":"https://api.github.com/users/madhusudhannsn/followers","following_url":"https://api.github.com/users/madhusudhannsn/following{/other_user}","gists_url":"https://api.github.com/users/madhusudhannsn/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudhannsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudhannsn/subscriptions","organizations_url":"https://api.github.com/users/madhusudhannsn/orgs","repos_url":"https://api.github.com/users/madhusudhannsn/repos","events_url":"https://api.github.com/users/madhusudhannsn/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudhannsn/received_events","type":"User","site_admin":false},"labels":[{"id":514165920,"url":"https://api.github.com/repos/explosion/spaCy/labels/lang%20/%20en","name":"lang / en","color":"726DA8","default":false},{"id":560441651,"url":"https://api.github.com/repos/explosion/spaCy/labels/models","name":"models","color":"726DA8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-19T08:11:10Z","updated_at":"2018-04-29T02:32:46Z","closed_at":"2018-04-29T02:32:46Z","author_association":"NONE","body":"I am using spacy word vectors for SVM text classification. I noticed that both en_vectors_web_lg and en_core_web_lg has good amount of word vectors but they are are not considering \"meanings of words in context\". Where as en_core_web_sm is using context sensitive tensors and good at considering the meaning for word vectors. But it does not come with lot of word vectors. For example,\r\n\r\n```\r\nimport spacy\r\nnlp = spacy.load('en_core_web_lg')\r\ndocs = [nlp(u\"dog bites man\"), nlp(u\"man bites dog\"),nlp(u\"man dog bites\"), nlp(u\"dog man bites\")]\r\nfor doc in docs:\r\n    for other_doc in docs:\r\n        print(doc.similarity(other_doc)) \r\n\r\nOutput: \r\n0.999999972267\r\n0.999999971159\r\n0.999999972676\r\n0.999999972676\r\n0.999999971159\r\n0.999999970051\r\n0.999999971568\r\n0.999999971568\r\n0.999999972676\r\n0.999999971568\r\n0.999999898398\r\n0.999999898398\r\n0.999999972676\r\n0.999999971568\r\n0.999999898398\r\n0.999999898398\r\n```\r\n```\r\nimport spacy\r\nnlp = spacy.load('en_core_web_sm')\r\ndocs = [nlp(u\"dog bites man\"), nlp(u\"man bites dog\"),nlp(u\"man dog bites\"), nlp(u\"dog man bites\")]\r\nfor doc in docs:\r\n    for other_doc in docs:\r\n        print(doc.similarity(other_doc)) \r\n\r\nOutput: \r\n\r\n0.999999950807\r\n0.941871427629\r\n0.906207995175\r\n0.93288197779\r\n0.941871427629\r\n1.00000005181\r\n0.910312731387\r\n0.900524118384\r\n0.906207995175\r\n0.910312731387\r\n0.999999977514\r\n0.94835300894\r\n0.93288197779\r\n0.900524118384\r\n0.94835300894\r\n1.0000000088\r\n\r\n```\r\n\r\nI tried the different examples of \"Similarities in context\" section in https://spacy.io/usage/vectors-similarity#section-basics and I see same behaviour. \r\n\r\nFor my use case I need a model which considers the meaning of the words in context and should have good amount of word vectors. I am confused about which model to pick.\r\n\r\n@honnibal @ines Could you please help me on this.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/explosion/spaCy/issues/comments/385220735","html_url":"https://github.com/explosion/spaCy/issues/1740#issuecomment-385220735","issue_url":"https://api.github.com/repos/explosion/spaCy/issues/1740","id":385220735,"user":{"login":"ines","id":13643239,"avatar_url":"https://avatars0.githubusercontent.com/u/13643239?v=4","gravatar_id":"","url":"https://api.github.com/users/ines","html_url":"https://github.com/ines","followers_url":"https://api.github.com/users/ines/followers","following_url":"https://api.github.com/users/ines/following{/other_user}","gists_url":"https://api.github.com/users/ines/gists{/gist_id}","starred_url":"https://api.github.com/users/ines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ines/subscriptions","organizations_url":"https://api.github.com/users/ines/orgs","repos_url":"https://api.github.com/users/ines/repos","events_url":"https://api.github.com/users/ines/events{/privacy}","received_events_url":"https://api.github.com/users/ines/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T02:32:46Z","updated_at":"2018-04-29T02:32:46Z","author_association":"OWNER","body":"Sorry about the confusion around this – see my comment in #1791:\r\n\r\n> Sorry about this – with the other changes and improvements coming in #2274, we've now decided to take this example out, because it's too misleading. The \"context\" here comes from the context-sensitive tensors that are available in the `sm` models, which don't come with word vectors. When we released the models for v2.0, we thought this might be cool – but the similarity in context feature turned out to be much less useful."}}
{"actor":{"display_login":"ines"}}