# lexical analysis(participle)

This interface, from the plug-in 1.1.8 Start Support

Lexical analysis provides two kinds of granularity word segmentation results, and can turn on part of speech tagging and proper name recognition according to the option.

# to initialize

Plugin version number in the document, only for example reference, the latest version of the plugin,Subject to this

{
  "pages": [
    "pages/index/index"
  ],
  "plugins": {
    "chatbot": {
      "version": "1.2.23",
      "provider": "wx8c631f7e9f2465e1"
    }
  },
  "requiredBackgroundModes": [
    "audio"
  ],
  "sitemapLocation": "sitemap.json"
}
var plugin = requirePlugin("chatbot")

App({
	onLaunch: function () {
		plugin.init({
			appid: "P5Ot9PHJDechCYqDFAW1AiK6OtG3Ja", //Mini Program sample account, for learning and reference only
			openid: "", //User's openid required
			success: () => {}, //Not required
			fail: (error) => {}, //Not required
		})
	},
})

# Call the lexical analysis interface

const txt =
	" Under the support of the two technologies of weixin Wisdom and weixin Wisdom, the weixin AI team launched the "weixin Dialogue Open Platform" and "Tencent Xiaowi" intelligent hardware two core products. The latest "weixin Frog Pro" released by the weixin Pay team set up an experience area on the scene to let everyone feel the ability of AI to recognize faces. "

plugin.api.nlp("tokenization" { q: txt }).then((nothing) => {
	console.log(tokenize result : ", nothing)
})

# Participle result

{
	"words": [
		"In,"
		weixin,
		"wisdom,"
		"Words,"
		"and,"
		weixin,
		"wisdom,"
		Listen,
		"two,"
		"Big,"
		"Technology,"
		"of,"
		"Support,"
		"Down,"
		",",
		weixin,
		"ai",
		"Team,"
		"Launch,"
		"The,"
		"“",
		weixin,
		"Dialogue,"
		"open,"
		"Platform,"
		初始值
		"and,"
		"“",
		"Tencent " the People's Republic of China
		"Small,"
		"Micro,"
		"”",
		"Smart,"
		"Hardware,"
		"two,"
		"Big,"
		"Core,"
		"Products,"
		"。",
		weixin,
		"Payment,"
		"Team,"
		The latest,
		"Release,"
		"of,"
		"“",
		weixin,
		The frog,
		"pro",
		"”",
		"In,"
		"Live,"
		"Settings,"
		"The,"
		"Experience,"
		"District,"
		",",
		"Let,"
		"Everybody,"
		"Feeling,"
		"ai",
		"Acknowledge,"
		"Face,"
		"of,"
		"ability,"
		"。"
	],
	"POSs": [
		25,
		16,
		16,
		46,
		25,
		16,
		16,
		46,
		15,
		1,
		16,
		30,
		33,
		8,
		34,
		31,
		23,
		16,
		31,
		36,
		34,
		16,
		33,
		33,
		16,
		34,
		5,
		34,
		6,
		1,
		38,
		34,
		16,
		16,
		15,
		1,
		16,
		16,
		34,
		6,
		31,
		16,
		1,
		31,
		30,
		34,
		31,
		16,
		23,
		34,
		25,
		28,
		31,
		30,
		33,
		16,
		34,
		31,
		27,
		31,
		23,
		31,
		16,
		30,
		16,
		34
	],
	"words_mix": [
		"In,"
		weixin,
		"wisdom,"
		"Words,"
		"and,"
		weixin,
		"wisdom,"
		初始值
		"two,"
		"Big,"
		"Technology,"
		"of,"
		"Support,"
		"Down,"
		",",
		weixin,
		"ai",
		"Team,"
		"Launch,"
		"The,"
		"“",
		weixin,
		"Dialogue,"
		"open,"
		"Platform,"
		"”",
		"and,"
		"“",
		"Tencent " the People's Republic of China
		"Small,"
		"”",
		"Smart,"
		"Hardware,"
		"two,"
		"Big,"
		"Core,"
		"Products,"
		"。",
		weixin,
		"Payment,"
		"Team,"
		The latest,
		"Release,"
		"of,"
		"“",
		weixin,
		The frog,
		"pro",
		"”",
		"In,"
		"Live,"
		"Settings,"
		"The,"
		"Experience,"
		"District,"
		",",
		"Let,"
		"Everybody,"
		"Feeling,"
		"ai",
		"Acknowledge,"
		"Face,"
		"of,"
		"ability,"
		"。"
	],
	"POSs_mix": [
		25,
		16,
		16,
		46,
		25,
		16,
		16,
		46,
		15,
		1,
		16,
		30,
		33,
		8,
		34,
		31,
		23,
		16,
		31,
		36,
		34,
		16,
		33,
		33,
		16,
		34,
		5,
		34,
		6,
		16,
		34,
		16,
		16,
		15,
		1,
		16,
		16,
		34,
		6,
		31,
		16,
		1,
		31,
		30,
		34,
		31,
		16,
		23,
		34,
		25,
		28,
		31,
		30,
		33,
		16,
		34,
		31,
		27,
		31,
		23,
		31,
		16,
		30,
		16,
		34
	],
	"entities": ["Tencent " the People's Republic of China "Small," "Latest Releases"],
	"entity_types": [100000013, 0, 0]
}

# Return value:

field type describe
words Array Character string array, general granularity word segmentation results
POSs Array Array of integers, part-of-speech tags, and wordsCorresponding by subscript
words_mix Array Character string array, mixed granularity segmentation results
POSs_mix Array Array of integers, part-of-speech tags, and words_mixAccording to subscript, the definition of the same POSs
entities Array Character string array, phrase extraction result, possibly empty
entity_types Array Integer arrays, phrase type tags, and entitiesCorresponding by subscript

# Participle part of speech:

POSs part of speech
1 adjective
2 Adjunct
3 Nomograph
4 Distinguishing words
5 conjunction
6 Adverb
7 interjection
8 Locative word
9 Morpheme word
10 Precursor components
11 idiom
12 Abbreviation
13 Posterior component
14 Idiom
15 numeral
16 noun
17 Name
18 surname
19 name
20 place name
21 Institutional groups
22 Other specialized[m
23 Non-kanji string
24 An onomatopoeia
25 preposition
26 measure word
27 pronoun
28 Locative word
29 Time words
30 Auxiliary word
31 verb
32 Adjunct verb
33 Nominal verb
34 Punctuation
35 Non-morpheme word
36 Statement label designator
37 State words
38 Morpheme
39 Distinguishing morpheme
40 Submorpheme
41 Numeral morpheme
42 Name morpheme
43 Quantitive morpheme
44 Substitute morpheme
45 Time morpheme
46 Dynamic morpheme
47 Modal morpheme
48 State lexicon
49 Beginning word
55 Closing words
0 Unknown part of speech
50 URL
51 Telephone Number
52 email

# Entity category

entity_types Phrase Type Tags
100000010 Chinese names
100000011 Foreign name
100000012 place name
100000013 Name of institution
100000014 Film and television, including movies, TV series, cartoon animation, programs
100000015 Fiction, including books, comics
100000016 Software
100000017 Games, including stand-alone games, online games, mobile games, web games
100000018 Music, including songs, albums
100000019 menu
100000020 disease
100000021 drug
100000022 automobile
100000023 Time Festival
初始值
100000201 Entity of unknown category
100000202
100000301 Music: Download Address
100000302 Music: Instruments
100000303 Music: Style
100000304 Music: Songs
100000305 Music: Lyrics
100000306 Music: Album
100000307 Name: Band
100000308 Name:Sights
100000309 Name: Mountain
100000310 Place Name: Lake
100000311 Film and Television: Movies
100000312 Film and Television: TV Series
100000313 Film and Television: Variety Shows
100000314 digital
100000315 ordinal number
100000316 Nation
100000317 Encyclopedia General Category