Code Monkey home page Code Monkey logo

praise_detect's Introduction

Algorithm praise detector

用来检测教师鼓励行为的模型,模型存放在./model_zoo

行为 模型文件名称 Precision Recall F1 Accuracy
鼓励 package_model_praise 0.86 0.91 0.82 0.84

Efficiency Performace

  • Please confirm your environment and installed necessary modules before running model.

  • You can acquire some information from requirements.txt.

  • test environment

    • Tesla P4, ubuntu 18.04, 4-cores CPU, 16G memory, GPU 7611MB(Not use), driver version= 418.67

    • Duration: 17 hours

  • Performace

    • speed
单位 value
字符/秒 26857

Quick Start

if you want to run this model, you can enter these on your command line.

> python3 test.py

USAGE

  • Basic version
# Top two lines are not necessary when do outer import
import sys
sys.path.append("../")

from algorithm_praise_detector.predictor import Predictor


model_path = "/workspace/tmp/package_model_praise"
model = Predictor(model_path)

# predict one piece of sentence
labels, probs, keywords = model.predict("你真的好棒啊!")
print(labels, probs)
print(keywords)

# predict list of sentences
input_list = ["你真的好棒!"]*3000
labels, probs, _ = model.predict(input_list)
assert len(input_list) == len(labels) == len(probs)
  • Interface version
# Top two lines are not necessary when do outer import
import sys
sys.path.append("../")

from algorithm_praise_detector import model


model_path = "./model_zoo/package_model_praise"
model = model(model_path)
input_text = [
    {
        "text":"这句话呢,其我我靠实都是很棒告诉你很棒规则,他就看你能不能看到他这个给你的规定了。",
        "begin_time":1326750,
        "end_time":1332165
    }
]
print(model(input_text))
# """[
#     {
#     'keyword_list':
#                     [
#                         {
#                         'keyword': '很棒',
#                         'word_count': 2
#                         }
#                     ],
#     'sentence': '这句话呢,其我操我靠实都是很棒告诉你很棒规则,
#                     他就看你能不能看到他这个给你的规定了。',
#     'begin_time': 1326750,
#     'end_time': 1332165}
#     ]
# """

praise_detect's People

Contributors

chenjunyu8 avatar

Watchers

黑夜路人 avatar  avatar Kevin Wan avatar  avatar Jinchao avatar wsforever avatar cloud avatar Hito avatar  avatar 沧海 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.