Show HN: Geoparsing and Sentiment Analysis of text

(geocode.xyz)

7 points | by eruci 2098 days ago

1 comments

  • eruci 2098 days ago
    This API extract locations as well as the 8 main sentiments from text (trust, fear, anticipation, sadness, disgust, anger, surprise, joy) from which it derives the overall sentiment (positive/negative)

    For example: https://geocode.xyz/?scantext=I%20love%20Boston%20for%20its%...

    Input: "I love Boston for its great universities and standard of living. Some areas however, can be a bit rough"

    Output: Region of search: US Match Location Boston,US Confidence Score: 0.9 Sentiment Analysis: This text is: positive (+0.666666666666667)

    great love rough

    The full range of sentiments in this text is: positive 0.4, anticipation 0.2, joy 0.2, fear 0, anger 0, trust 0, surprise 0, negative 0, sadness 0, disgust 0,

    • nautical 2094 days ago
      'I don't love Boston as some areas can be a bit rough' shows as a positive sentiment

      positive 0.333333333333333, joy 0.333333333333333, fear 0, anticipation 0, anger 0, trust 0, surprise 0, negative 0, sadness 0, disgust 0

      Another potential issue for some people might be well known acronyms .. example for input : 'I don't love UK as some areas can be a bit rough' UK is not appearing in top 10 results also.

      • eruci 2093 days ago
        You are correct, it does not work so well with very short text. That's an area I'm improving on.

        It could be spot on with longer text, especially with book excerpts, which is what I designed the system for originally, for eg: https://goo.gl/Vq4U2p

        "Well, a relatively minor operation changed me into a black-skinned Terran, though the surgeon/replacers could do nothing, ironically enough in view of my new color, to increase my resistance to heat. I remember those stirring days of combat sometimes, usually when I am making my semi-annual flight between Churchill, Manitoba, and Tierra Del Fuego. In fact, during those flights when I am practically alone is the only time I have to reflect or remember, because on both of my estates there is nothing but noise, children, and wives."

        Match Location Manitoba,CA Confidence Score: 0.1 Churchill,CA Confidence Score: 0.1

        Sentiment Analysis: This text is: negative (-0.166666666666667)

        ironicallyenoughwellresistancenoise

        The full range of sentiments in this text is: fear 0.1875, negative 0.1875, anticipation 0.125, anger 0.125, trust 0.125, positive 0.125, joy 0.0625, surprise 0, sadness 0, disgust 0,