自然言語処理、NLP中国の感情モデル、オープンソースプロジェクト

自然言語処理、NLP中国の感情モデル

そして、モデルをやって自分の感情を共有するために、ありがとう、みんなを呼び出そうと任意のフィードバックを歓迎

シンプルNLPパイプライン

このプロジェクトは、サーバーのサービスとして展開可能NLPパイプラインとして開発されます。元の言語モデルがあるCoreNLPスタンフォードNLPグループから。公式には、中国のモデルは、そのパイプラインの多くが、ためにサポートされている感情の注釈。このプロジェクトは、15万を超える感傷バイナリ木から学んだ感情モデルを提供します。より多くのモデルの詳細とAPIについては、こちら

質問

文を照会するには、ここでのサンプルコマンドは次のとおりです。

wget --post-data '无敌是多么的孤独' 'nlp.awesomevc.com:81' -O-

結果

出力はJSON形式であります

感情

"sentimentValue": "3",
"sentiment": "Positive",
"sentimentDistribution": [
        0.04447204774245,
        0.13967615459976,
        0.2460704480222,
        0.38548481571688,
        0.18338223574722,
        0.00091429817149
      ],
"sentimentTree": "(ROOT|sentiment=3|prob=0.385 (VV|sentiment=2|prob=0.369 无敌)\n  (VP|sentiment=3|prob=0.470 (VC|sentiment=2|prob=0.348 是)\n    (VP|sentiment=2|prob=0.488 (ADVP|sentiment=2|prob=0.352 多么的) (VP|sentiment=2|prob=0.461 孤独))))"

データフィールドの説明:

  • sentimentValue:「感情」、0-VeryNegative、1陰性、2-中性、3陰性、4- VeryNegative、5-IgnoredForNowための整数値
  • 感情:感情のレベル
  • sentimentDistribution:感情のレベルのための尤度分布

POSタグ付け&NER&その他

クエリ:

wget --post-data '我家在北京有房, 就在东二环旁边' 'nlp.awesomevc.com:81' -O-

出力:

{
          "index": 1,
          "word": "我家",
          "originalText": "我家",
          "lemma": "我家",
          "characterOffsetBegin": 0,
          "characterOffsetEnd": 2,
          "pos": "NN",
          "ner": "O"
        },
        {
          "index": 2,
          "word": "在",
          "originalText": "在",
          "lemma": "在",
          "characterOffsetBegin": 2,
          "characterOffsetEnd": 3,
          "pos": "P",
          "ner": "O"
        },
        {
          "index": 3,
          "word": "北京",
          "originalText": "北京",
          "lemma": "北京",
          "characterOffsetBegin": 3,
          "characterOffsetEnd": 5,
          "pos": "NR",
          "ner": "STATE_OR_PROVINCE"
        },
        {
          "index": 4,
          "word": "有",
          "originalText": "有",
          "lemma": "有",
          "characterOffsetBegin": 5,
          "characterOffsetEnd": 6,
          "pos": "VE",
          "ner": "O"
        },
        {
          "index": 5,
          "word": "房",
          "originalText": "房",
          "lemma": "房",
          "characterOffsetBegin": 6,
          "characterOffsetEnd": 7,
          "pos": "NN",
          "ner": "O"
        },
        {
          "index": 6,
          "word": ",",
          "originalText": ",",
          "lemma": ",",
          "characterOffsetBegin": 7,
          "characterOffsetEnd": 8,
          "pos": "PU",
          "ner": "O"
        },
        {
          "index": 7,
          "word": "就",
          "originalText": "就",
          "lemma": "就",
          "characterOffsetBegin": 9,
          "characterOffsetEnd": 10,
          "pos": "AD",
          "ner": "O"
        },
        {
          "index": 8,
          "word": "在",
          "originalText": "在",
          "lemma": "在",
          "characterOffsetBegin": 10,
          "characterOffsetEnd": 11,
          "pos": "P",
          "ner": "O"
        },
        {
          "index": 9,
          "word": "东二环",
          "originalText": "东二环",
          "lemma": "东二环",
          "characterOffsetBegin": 11,
          "characterOffsetEnd": 14,
          "pos": "NR",
          "ner": "FACILITY"
        },
        {
          "index": 10,
          "word": "旁边",
          "originalText": "旁边",
          "lemma": "旁边",
          "characterOffsetBegin": 14,
          "characterOffsetEnd": 16,
          "pos": "NN",
          "ner": "O"
        }

おすすめ

転載: blog.csdn.net/weixin_40473141/article/details/84190084