GithubHelp home page GithubHelp logo

geisterfurz007 / heatdetector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sobotics/heatdetector

0.0 2.0 0.0 1.13 MB

API to classify if content contains "Heat", snarky, rude or user feeling attacked, both by using ML and regex.

Home Page: http://heatdetector.sobotics.org/api

License: GNU General Public License v3.0

Java 100.00%

heatdetector's Introduction

HeatDetector

HeatDetector is an API that can classify content (used for classifing comments on SE network). The classifier use both ML and regex to find "Heat". Heat is an user beeing snarky, offensive or rude but also content that indicate that a user is feeling attacked. The api can also be used to track certain words/phrases using regex that is editable via web interface. Read more at Heat Detector - analysing comments to find heat

The application contains both a spring bot and an angular application. The spring bot is the actual api and the angular application allows logged users to modify thier domain settings.

Usage

To usage the api you need to request an api key. The api has a very "crude" rate limiter that allows you to call it every 30s but with upto 100 different texts to classify. If you call it more often a backoff will be sent and if this is not respected the ip will be rate limited for 5 minutes.

###Example usage of API

Request

{
 "domain": "stackoverflow", //domain for regex
 "minScore": "4", //if classifed score is below it will not return result on contents entry  
 "contents": [
        {
        "id":1, //Identification of content (long)
        "text": "fuck you, you are an arse" //Text to classify
        },
            {
        "id":2,
        "text": "I need help @MrBean. please don't insult.",
        "href": "https://stackoverflow.com/questions/51588616/when-click-button-to-open-another-activity-my-app-crashing-sometimes#comment90145474_51588616" //link to comment only used in web interface, not compulsory
        }
    ]
 }

Response

{
 "domain": "stackoverflow",
 "result": [
    {
        "id": 1,
        "nb": 0.9999999209847878,
        "op": 0.5,
        "bad": {
            "regex": "(?i)(f\\W{1,4}k|f.{0,2}u.{0,2}c.{0,2}k)\\s(of|e.{0,2}r|u|yo)",
            "type": 3
        },
        "score": 10
    },
    {
        "id": 2,
        "nb": 0.9447963253138169,
        "op": 0.5,
        "bad": {
            "regex": "(?i)\\binsults?\\b(?! to injury)",
            "type": 3
        },
        "score": 6
    }
 ],
 "backOff": 0
}

heatdetector's People

Contributors

geisterfurz007 avatar jdd-software avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.