{"action":"opened","issue":{"url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/2","repository_url":"https://api.github.com/repos/philferriere/mscstexta4r","labels_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/2/comments","events_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/2/events","html_url":"https://github.com/philferriere/mscstexta4r/issues/2","id":175489908,"number":2,"title":"Error while using textaSentiment()","user":{"login":"SanchitSood","id":22052367,"avatar_url":"https://avatars.githubusercontent.com/u/22052367?v=3","gravatar_id":"","url":"https://api.github.com/users/SanchitSood","html_url":"https://github.com/SanchitSood","followers_url":"https://api.github.com/users/SanchitSood/followers","following_url":"https://api.github.com/users/SanchitSood/following{/other_user}","gists_url":"https://api.github.com/users/SanchitSood/gists{/gist_id}","starred_url":"https://api.github.com/users/SanchitSood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanchitSood/subscriptions","organizations_url":"https://api.github.com/users/SanchitSood/orgs","repos_url":"https://api.github.com/users/SanchitSood/repos","events_url":"https://api.github.com/users/SanchitSood/events{/privacy}","received_events_url":"https://api.github.com/users/SanchitSood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-07T12:28:25Z","updated_at":"2016-09-07T12:28:25Z","closed_at":null,"body":"Hi Phil\r\nAfter calling the package library(mscstexta4r).\r\nI have set the environment as \r\nSys.setenv(MSCS_TEXTANALYTICS_URL=\"https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment\")\r\n Sys.setenv(MSCS_TEXTANALYTICS_KEY=\"XXXX\")\r\nthen ran the code as below(given as an example with the package)\r\n\r\n`textaInit()\r\n\r\ndocsText <- c(\r\n  \"Loved the food, service and atmosphere! We'll definitely be back.\",\r\n  \"Very good food, reasonable prices, excellent service.\",\r\n  \"It was a great restaurant.\",\r\n  \"If steak is what you want, this is the place.\",\r\n  \"The atmosphere is pretty bad but the food is quite good.\",\r\n  \"The food is quite good but the atmosphere is pretty bad.\",\r\n  \"I'm not sure I would come back to this restaurant.\",\r\n  \"The food wasn't very good.\",\r\n  \"While the food was good the service was a disappointment.\",\r\n  \"I was very disappointed with both the service and my entree.\"\r\n)\r\n\r\ndocsLanguage <- rep(\"en\", length(docsText))\r\n  tryCatch({\r\n    # Perform sentiment analysis\r\n    docsSentiment <- textaSentiment(\r\n      documents = docsText, # Input sentences or documents\r\n      languages = docsLanguage\r\n      # \"en\"(English, default)|\"es\"(Spanish)|\"fr\"(French)|\"pt\"(Portuguese)\r\n    )\r\n    # Class and structure of docsSentiment\r\n    class(docsSentiment)\r\n    #> [1] \"texta\"\r\n    str(docsSentiment, max.level = 1)\r\n    #> List of 3\r\n    #> $ results:'data.frame': 10 obs. of 2 variables:\r\n    #> $ json : chr \"{\\\"documents\\\":[{\\\"score\\\":0.9903013,\\\"id\\\":\\\"hDgKc\\\", __truncated__ }]}\r\n    #> $ request:List of 7\r\n    #> ..- attr(*, \"class\")= chr \"request\"\r\n    #> - attr(*, \"class\")= chr \"texta\"\r\n    # Print results\r\n    docsSentiment\r\n    #> texta [https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment]\r\n    \r\n  }, error = function(err) {\r\n    # Print error\r\n    geterrmessage()\r\n  })\r\n## End(Not run)\r\n\r\n`\r\nI get an error \"**mscstexta4r: Not Found (HTTP 404). - { \\\"statusCode\\\": 404, \\\"message\\\": \\\"Resource not found\\\" }\"**"}}
{"actor":{"display_login":"SanchitSood"}}