{"action":"created","issue":{"url":"https://api.github.com/repos/wooorm/retext-keywords/issues/1","labels_url":"https://api.github.com/repos/wooorm/retext-keywords/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wooorm/retext-keywords/issues/1/comments","events_url":"https://api.github.com/repos/wooorm/retext-keywords/issues/1/events","html_url":"https://github.com/wooorm/retext-keywords/issues/1","id":70407318,"number":1,"title":"Duplicates using the same word","user":{"login":"molinto","id":279285,"avatar_url":"https://avatars.githubusercontent.com/u/279285?v=3","gravatar_id":"","url":"https://api.github.com/users/molinto","html_url":"https://github.com/molinto","followers_url":"https://api.github.com/users/molinto/followers","following_url":"https://api.github.com/users/molinto/following{/other_user}","gists_url":"https://api.github.com/users/molinto/gists{/gist_id}","starred_url":"https://api.github.com/users/molinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molinto/subscriptions","organizations_url":"https://api.github.com/users/molinto/orgs","repos_url":"https://api.github.com/users/molinto/repos","events_url":"https://api.github.com/users/molinto/events{/privacy}","received_events_url":"https://api.github.com/users/molinto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-23T13:10:50Z","updated_at":"2015-04-23T14:11:46Z","closed_at":"2015-04-23T14:11:46Z","body":"Hi, great project btw!\r\n\r\nSlight issue using same word in the title, eg:\r\n\"How to Get best More Likes on Your Facebook Page \" ->  \"keywords\": [ \"facebook\", \"page\" ].\r\n\r\nBut if you put **page** in the title twice:\r\n\"How to Get best More **page** Likes on Your Facebook Page\" ->  \"keywords\": [  \"page,page\" ].\r\n\r\n```javascript\r\n\r\nvar Retext = require('retext'),\r\n    visit = require('retext-visit'),\r\n    keywords = require('retext-keywords'),\r\n    sentiment = require('retext-sentiment');\r\nvar rt = new Retext().use(visit).use(keywords).use(sentiment);\r\n\r\nrt.parse(headline, function (err, tree) {\r\n        if (err) return cb(err);\r\n        if (tree.length == 0) {\r\n            return cb(new Error('Error loading the data!'));\r\n        }\r\n\r\n       var s = []\r\n      _.forEach(tree.keywords({ 'minimum': 1 }), function(n) {\r\n            s.push(n.nodes.toString());\r\n      });\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/wooorm/retext-keywords/issues/comments/95599748","html_url":"https://github.com/wooorm/retext-keywords/issues/1#issuecomment-95599748","issue_url":"https://api.github.com/repos/wooorm/retext-keywords/issues/1","id":95599748,"user":{"login":"wooorm","id":944406,"avatar_url":"https://avatars.githubusercontent.com/u/944406?v=3","gravatar_id":"","url":"https://api.github.com/users/wooorm","html_url":"https://github.com/wooorm","followers_url":"https://api.github.com/users/wooorm/followers","following_url":"https://api.github.com/users/wooorm/following{/other_user}","gists_url":"https://api.github.com/users/wooorm/gists{/gist_id}","starred_url":"https://api.github.com/users/wooorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wooorm/subscriptions","organizations_url":"https://api.github.com/users/wooorm/orgs","repos_url":"https://api.github.com/users/wooorm/repos","events_url":"https://api.github.com/users/wooorm/events{/privacy}","received_events_url":"https://api.github.com/users/wooorm/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T14:11:46Z","updated_at":"2015-04-23T14:11:46Z","body":"You got me looking there for a while: It’s some time ago since i looked at it.\r\nHowever, take another look at the results you get: `[ \"facebook\", \"page\" ]`, and `[ \"page,page\" ]` (note the comma/quotes).\r\n\r\nThat’s because `n.nodes` is an array of one or more nodes: in the first headline, it contains one node for each entry. In the second, two nodes for one entry.\r\n\r\nI’m not sure what your goal is, if you want to get the stem, you should check `n.stem`, if you want to get an example word, check `n.nodes[0].toString()`, if you’d like to get all words, `n.nodes.join(', ')`, note the space, might be better :)\r\n\r\nDid that help?"}}