文本分析

检测文本中的情绪、关键短语、命名实例和语言

Extract information from your text. See it in action!

Use the demo below to experiment with the Text Analytics API. Use our example or provide your own text in the input box below. Identify language, sentiment, key phrases, and entities (preview) in your text.

  1. 已分析文本
  2. JSON
语言: English(置信度: 100%)
关键短语: place, online menu, great menu, marvelous food, midtown NYC, week, dinner party, Contoso Steakhouse, pre-order, John Doe, Sirloin steak, chief cook, owner, kitchen, spot, dining, complaint, email
情绪:
Document
MIXED
86%
Positive
0%
Neutral
14%
Negative
Sentence 1
POSITIVE
99%
Positive
1%
Neutral
0%
Negative
Sentence 2
POSITIVE
100%
Positive
0%
Neutral
0%
Negative
Sentence 3
POSITIVE
100%
Positive
0%
Neutral
0%
Negative
Sentence 4
POSITIVE
100%
Positive
0%
Neutral
0%
Negative
Sentence 5
POSITIVE
100%
Positive
0%
Neutral
0%
Negative
Sentence 6
NEUTRAL
0%
Positive
100%
Neutral
0%
Negative
Sentence 7
NEGATIVE
0%
Positive
0%
Neutral
100%
Negative
Sentence 8
POSITIVE
100%
Positive
0%
Neutral
0%
Negative
命名实体: Contoso Steakhouse [Organization]
Steakhouse [Location]
midtown NYC [Location]
NYC [Location-GPE]
last week [DateTime-DateRange]
dinner party [Event]
chief cook [PersonType]
owner [PersonType]
John Doe [Person]
kitchen [Location]
www.contoso_steakhouse.com [URL]
312-555-0176 [PhoneNumber]
email [Skill]
PII Entities: Type: Organization
Value: Contoso Steakhouse

Type: Person
Value: John Doe

Type: URL
Value: www.contoso_steakhouse.com

Type: PhoneNumber
Value: 312-555-0176

链接实体: We went to Contoso Steakhouse located at midtown NYC last week for a dinner party, and we adore the spot! They provide marvelous food and they have a great menu. The chief cook happens to be the owner (I think his name is John Doe) and he is super nice, coming out of the kitchen and greeted us all. We enjoyed very much dining in the place! The Sirloin steak I ordered was tender and juicy, and the place was impeccably clean. You can even pre-order from their online menu at www.contoso_steakhouse.com, call 312-555-0176 or send email to order@contoso_steakhouse.com! The only complaint I have is the food didn't come fast enough. Overall I highly recommend it!
{
  "languageDetection": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "detectedLanguages": [
          {
            "name": "English",
            "iso6391Name": "en",
            "score": 1.0
          }
        ]
      }
    ],
    "errors": [],
    "modelversion": "2019-10-01"
  },
  "keyPhrases": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "keyPhrases": [
          "place",
          "online menu",
          "great menu",
          "marvelous food",
          "midtown NYC",
          "week",
          "dinner party",
          "Contoso Steakhouse",
          "pre-order",
          "John Doe",
          "Sirloin steak",
          "chief cook",
          "owner",
          "kitchen",
          "spot",
          "dining",
          "complaint",
          "email"
        ]
      }
    ],
    "errors": [],
    "modelversion": "2019-10-01"
  },
  "sentiment": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "sentiment": "mixed",
        "documentscores": {
          "positive": 0.86,
          "neutral": 0.0,
          "negative": 0.14
        },
        "sentences": [
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 0.99,
              "neutral": 0.01,
              "negative": 0.0
            },
            "offset": 0,
            "length": 105
          },
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 1.0,
              "neutral": 0.0,
              "negative": 0.0
            },
            "offset": 106,
            "length": 55
          },
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 1.0,
              "neutral": 0.0,
              "negative": 0.0
            },
            "offset": 162,
            "length": 137
          },
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 1.0,
              "neutral": 0.0,
              "negative": 0.0
            },
            "offset": 300,
            "length": 41
          },
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 1.0,
              "neutral": 0.0,
              "negative": 0.0
            },
            "offset": 342,
            "length": 85
          },
          {
            "sentiment": "neutral",
            "sentencescores": {
              "positive": 0.0,
              "neutral": 1.0,
              "negative": 0.0
            },
            "offset": 428,
            "length": 141
          },
          {
            "sentiment": "negative",
            "sentencescores": {
              "positive": 0.0,
              "neutral": 0.0,
              "negative": 1.0
            },
            "offset": 570,
            "length": 62
          },
          {
            "sentiment": "positive",
            "sentencescores": {
              "positive": 1.0,
              "neutral": 0.0,
              "negative": 0.0
            },
            "offset": 633,
            "length": 30
          }
        ]
      }
    ],
    "errors": [],
    "modelversion": "2019-10-01"
  },
  "entities": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "entities": [
          {
            "text": "Contoso Steakhouse",
            "type": "Organization",
            "subtype": null,
            "offset": 11,
            "length": 18,
            "score": 0.65
          },
          {
            "text": "Steakhouse",
            "type": "Location",
            "subtype": null,
            "offset": 19,
            "length": 10,
            "score": 0.33
          },
          {
            "text": "midtown NYC",
            "type": "Location",
            "subtype": null,
            "offset": 41,
            "length": 11,
            "score": 0.56
          },
          {
            "text": "NYC",
            "type": "Location",
            "subtype": "GPE",
            "offset": 49,
            "length": 3,
            "score": 0.9
          },
          {
            "text": "last week",
            "type": "DateTime",
            "subtype": "DateRange",
            "offset": 53,
            "length": 9,
            "score": 0.8
          },
          {
            "text": "dinner party",
            "type": "Event",
            "subtype": null,
            "offset": 69,
            "length": 12,
            "score": 0.52
          },
          {
            "text": "chief cook",
            "type": "PersonType",
            "subtype": null,
            "offset": 166,
            "length": 10,
            "score": 0.72
          },
          {
            "text": "owner",
            "type": "PersonType",
            "subtype": null,
            "offset": 195,
            "length": 5,
            "score": 0.78
          },
          {
            "text": "John Doe",
            "type": "Person",
            "subtype": null,
            "offset": 222,
            "length": 8,
            "score": 0.84
          },
          {
            "text": "kitchen",
            "type": "Location",
            "subtype": null,
            "offset": 272,
            "length": 7,
            "score": 0.68
          },
          {
            "text": "www.contoso_steakhouse.com",
            "type": "URL",
            "subtype": null,
            "offset": 477,
            "length": 26,
            "score": 0.8
          },
          {
            "text": "312-555-0176",
            "type": "PhoneNumber",
            "subtype": null,
            "offset": 510,
            "length": 12,
            "score": 0.8
          },
          {
            "text": "email",
            "type": "Skill",
            "subtype": null,
            "offset": 531,
            "length": 5,
            "score": 0.8
          }
        ]
      }
    ],
    "errors": [],
    "modelversion": "2020-02-01"
  },
  "entityLinking": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "entities": [
          {
            "name": "Sirloin steak",
            "matches": [
              {
                "text": "Sirloin steak",
                "offset": 346,
                "length": 13,
                "score": 0.587581248582304
              }
            ],
            "language": "en",
            "id": "Sirloin steak",
            "url": "https://en.wikipedia.org/wiki/Sirloin_steak",
            "datasource": "Wikipedia"
          },
          {
            "name": "Steakhouse",
            "matches": [
              {
                "text": "Steakhouse",
                "offset": 19,
                "length": 10,
                "score": 0.690180109345877
              }
            ],
            "language": "en",
            "id": "Steakhouse",
            "url": "https://en.wikipedia.org/wiki/Steakhouse",
            "datasource": "Wikipedia"
          },
          {
            "name": "John Doe",
            "matches": [
              {
                "text": "John Doe",
                "offset": 222,
                "length": 8,
                "score": 0.0014322986345076671
              }
            ],
            "language": "en",
            "id": "John Doe",
            "url": "https://en.wikipedia.org/wiki/John_Doe",
            "datasource": "Wikipedia"
          },
          {
            "name": "Contoso",
            "matches": [
              {
                "text": "Contoso",
                "offset": 11,
                "length": 7,
                "score": 0.60043485187820367
              }
            ],
            "language": "en",
            "id": "Contoso",
            "url": "https://en.wikipedia.org/wiki/Contoso",
            "datasource": "Wikipedia"
          },
          {
            "name": "New York City",
            "matches": [
              {
                "text": "NYC",
                "offset": 49,
                "length": 3,
                "score": 0.33013566281980689
              }
            ],
            "language": "en",
            "id": "New York City",
            "url": "https://en.wikipedia.org/wiki/New_York_City",
            "datasource": "Wikipedia"
          }
        ]
      }
    ],
    "errors": [],
    "modelversion": "2020-02-01"
  },
  "entityPII": {
    "documents": [
      {
        "id": "e0719ce6-8bbf-4161-8cdf-da8dfc6dde00",
        "entities": [
          {
            "text": "Contoso Steakhouse",
            "type": "Organization",
            "subtype": null,
            "offset": 11,
            "length": "18",
            "score": 0.65
          },
          {
            "text": "John Doe",
            "type": "Person",
            "subtype": null,
            "offset": 222,
            "length": "8",
            "score": 0.84
          },
          {
            "text": "www.contoso_steakhouse.com",
            "type": "URL",
            "subtype": null,
            "offset": 477,
            "length": "26",
            "score": 0.8
          },
          {
            "text": "312-555-0176",
            "type": "PhoneNumber",
            "subtype": null,
            "offset": 510,
            "length": "12",
            "score": 0.8
          }
        ]
      }
    ],
    "errors": [],
    "modelversion": "2020-02-01"
  }
}

观点分析

API 会返回介于 0 到 1 之间的数字评分。评分接近 1 代表积极的情绪,评分接近 0 代表消极的情绪。情绪评分是使用分类技术生成的。分类器的输入特征包括 n 个字尾 (n-gram)、词性标记生成的特征和词嵌入。它受众多语言支持。

了解更多

关键短语提取

The API returns a list of strings denoting the key talking points in the input text. We employ techniques from Microsoft Office's sophisticated Natural Language Processing toolkit. English, German, Spanish, and Japanese text are supported.

了解更多

语言检测

API 会返回检测的语言和数字评分(介于 0 到 1 之间)。评分接近 1 表示 100% 确定识别的语言是正确的。共支持 120 种语言。

了解更多

识别命名实体

检测文本中的所有命名实体,如组织、人员和位置等。实体链接通过将文本与 Web 上的其他信息关联来消除不同实体的歧义。例如,用于确定诸如“times”之类的术语是指“纽约时报”还是“时代广场”。

了解更多

Prism Skylabs

"We found Cognitive Services to be the missing piece in the equation, the one that we needed to bring this solution to market and really revolutionize the way people look at video."

Katie McCann:产品和工程副总裁 | Prism Skylabs

了解认知服务 API

计算机影像

从图像中提取可操作信息

人脸

检测、识别、分析、组织和标记照片中的人脸

墨迹识别器

一种可识别数字墨迹内容(例如手写内容、形状和墨迹文档布局)的 AI 服务

视频索引器

解锁视频见解

自定义视觉

为你独一无二的用例轻松自定义最先进的计算机影像模型

表单识别器

AI 驱动的文档提取服务,可理解表单

文本分析

轻松评估观点和主题以理解用户的需求

文本翻译

通过简单的 REST API 调用即可轻松进行机器翻译

QnA Maker

提取信息,并将其转化为一目了然的对话式答案

语言理解

教会应用理解用户发出的命令

沉浸式阅读器

使各年龄层和各种能力水平的用户都能阅读并理解文本

语音服务

针对语音转文本、文本转语音和语音翻译的统一语音服务

说话人识别

使用语音辨识和验证各个说话人的身份

语音翻译

在应用中轻松集成实时语音翻译

语音转文本

将口述音频转换为文本,以实现更自然的交互

文本转语音 

将文本转换为语音,以创建更加自然、无障碍的交互界面

内容审查器

自动化图像、文本和视频审查

异常检测器

将异常检测功能轻松嵌入到应用中。

个性化体验创建服务

提供个性化用户体验的 AI 服务

准备好让你的应用如虎添翼了吗?