こんにちは、オープンソースコンサルタント、データサイエンティストでお馴染みの内です。今回は数あるオープンソースの形態素解析器の中から、わりと新しく出た「Sudachi」を試して見たいと思います
「Sudachi」はERPパッケージで有名なワークスアプリケーションズさんのAI研究機関であるワークス徳島人工知能NLP研究所が開発し、オープンソースとして公開している形態素解析器です。研究所が徳島にあるから徳島特産のすだち由来の名前なんですね。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
|
curl -XPOST localhost:9200/sudachi_test/_analyze?pretty -H "Content-Type: application/json" -d@geekfeed_introduction.json { "detail" : { "custom_analyzer" : true, "charfilters" : [ ], "tokenizer" : { "name" : "sudachi_tokenizer", "tokens" : [ { "token" : "株式会社", "start_offset" : 0, "end_offset" : 4, "type" : "word", "position" : 0, "aUnits" : null, "bUnits" : null, "baseForm" : "株式会社", "bytes" : "[e6 a0 aa e5 bc 8f e4 bc 9a e7 a4 be]", "isOOV" : false, "normalizedForm" : "株式会社", "partOfSpeech" : "名詞,普通名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "カブシキガイシャ", "reading" : "カブシキガイシャ", "termFrequency" : 1 }, { "token" : "ギークフィード", "start_offset" : 4, "end_offset" : 11, "type" : "word", "position" : 1, "aUnits" : null, "bUnits" : null, "baseForm" : "ギークフィード", "bytes" : "[e3 82 ae e3 83 bc e3 82 af e3 83 95 e3 82 a3 e3 83 bc e3 83 89]", "isOOV" : false, "normalizedForm" : "ギークフィード", "partOfSpeech" : "名詞,固有名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "ギークフィード", "reading" : "ギークフィード", "termFrequency" : 1 }, { "token" : "は", "start_offset" : 11, "end_offset" : 12, "type" : "word", "position" : 2, "aUnits" : null, "bUnits" : null, "baseForm" : "は", "bytes" : "[e3 81 af]", "isOOV" : false, "normalizedForm" : "は", "partOfSpeech" : "助詞,係助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ハ", "reading" : "ハ", "termFrequency" : 1 }, { "token" : "Asterisk", "start_offset" : 13, "end_offset" : 21, "type" : "word", "position" : 3, "aUnits" : null, "bUnits" : null, "baseForm" : "Asterisk", "bytes" : "[41 73 74 65 72 69 73 6b]", "isOOV" : false, "normalizedForm" : "Asterisk", "partOfSpeech" : "名詞,固有名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "アスタリスク", "reading" : "アスタリスク", "termFrequency" : 1 }, { "token" : "など", "start_offset" : 21, "end_offset" : 23, "type" : "word", "position" : 4, "aUnits" : null, "bUnits" : null, "baseForm" : "など", "bytes" : "[e3 81 aa e3 81 a9]", "isOOV" : false, "normalizedForm" : "など", "partOfSpeech" : "助詞,副助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ナド", "reading" : "ナド", "termFrequency" : 1 }, { "token" : "の", "start_offset" : 23, "end_offset" : 24, "type" : "word", "position" : 5, "aUnits" : null, "bUnits" : null, "baseForm" : "の", "bytes" : "[e3 81 ae]", "isOOV" : false, "normalizedForm" : "の", "partOfSpeech" : "助詞,格助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ノ", "reading" : "ノ", "termFrequency" : 1 }, { "token" : "オープンソース", "start_offset" : 24, "end_offset" : 31, "type" : "word", "position" : 6, "aUnits" : null, "bUnits" : null, "baseForm" : "オープンソース", "bytes" : "[e3 82 aa e3 83 bc e3 83 97 e3 83 b3 e3 82 bd e3 83 bc e3 82 b9]", "isOOV" : false, "normalizedForm" : "オープンソース", "partOfSpeech" : "名詞,固有名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "オープンソース", "reading" : "オープンソース", "termFrequency" : 1 }, { "token" : "を", "start_offset" : 31, "end_offset" : 32, "type" : "word", "position" : 7, "aUnits" : null, "bUnits" : null, "baseForm" : "を", "bytes" : "[e3 82 92]", "isOOV" : false, "normalizedForm" : "を", "partOfSpeech" : "助詞,格助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ヲ", "reading" : "ヲ", "termFrequency" : 1 }, { "token" : "活用", "start_offset" : 32, "end_offset" : 34, "type" : "word", "position" : 8, "aUnits" : null, "bUnits" : null, "baseForm" : "活用", "bytes" : "[e6 b4 bb e7 94 a8]", "isOOV" : false, "normalizedForm" : "活用", "partOfSpeech" : "名詞,普通名詞,サ変可能,*,*,*", "positionLength" : 1, "pronunciation" : "カツヨウ", "reading" : "カツヨウ", "termFrequency" : 1 }, { "token" : "し", "start_offset" : 34, "end_offset" : 35, "type" : "word", "position" : 9, "aUnits" : null, "bUnits" : null, "baseForm" : "する", "bytes" : "[e3 81 97]", "isOOV" : false, "normalizedForm" : "為る", "partOfSpeech" : "動詞,非自立可能,*,*,サ行変格,連用形-一般", "positionLength" : 1, "pronunciation" : "シ", "reading" : "シ", "termFrequency" : 1 }, { "token" : "た", "start_offset" : 35, "end_offset" : 36, "type" : "word", "position" : 10, "aUnits" : null, "bUnits" : null, "baseForm" : "た", "bytes" : "[e3 81 9f]", "isOOV" : false, "normalizedForm" : "た", "partOfSpeech" : "助動詞,*,*,*,助動詞-タ,連体形-一般", "positionLength" : 1, "pronunciation" : "タ", "reading" : "タ", "termFrequency" : 1 }, { "token" : "システム開発", "start_offset" : 36, "end_offset" : 42, "type" : "word", "position" : 11, "aUnits" : null, "bUnits" : null, "baseForm" : "システム開発", "bytes" : "[e3 82 b7 e3 82 b9 e3 83 86 e3 83 a0 e9 96 8b e7 99 ba]", "isOOV" : false, "normalizedForm" : "システム開発", "partOfSpeech" : "名詞,固有名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "システムカイハツ", "reading" : "システムカイハツ", "termFrequency" : 1 }, ・・・・・省略・・・・・ { "token" : "ディープラーニング", "start_offset" : 133, "end_offset" : 142, "type" : "word", "position" : 53, "aUnits" : null, "bUnits" : null, "baseForm" : "ディープラーニング", "bytes" : "[e3 83 87 e3 82 a3 e3 83 bc e3 83 97 e3 83 a9 e3 83 bc e3 83 8b e3 83 b3 e3 82 b0]", "isOOV" : false, "normalizedForm" : "ディープラーニング", "partOfSpeech" : "名詞,普通名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "ディープラーニング", "reading" : "ディープラーニング", "termFrequency" : 1 }, { "token" : "の", "start_offset" : 142, "end_offset" : 143, "type" : "word", "position" : 54, "aUnits" : null, "bUnits" : null, "baseForm" : "の", "bytes" : "[e3 81 ae]", "isOOV" : false, "normalizedForm" : "の", "partOfSpeech" : "助詞,格助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ノ", "reading" : "ノ", "termFrequency" : 1 }, { "token" : "事業", "start_offset" : 143, "end_offset" : 145, "type" : "word", "position" : 55, "aUnits" : null, "bUnits" : null, "baseForm" : "事業", "bytes" : "[e4 ba 8b e6 a5 ad]", "isOOV" : false, "normalizedForm" : "事業", "partOfSpeech" : "名詞,普通名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "ジギョウ", "reading" : "ジギョウ", "termFrequency" : 1 }, { "token" : "も", "start_offset" : 145, "end_offset" : 146, "type" : "word", "position" : 56, "aUnits" : null, "bUnits" : null, "baseForm" : "も", "bytes" : "[e3 82 82]", "isOOV" : false, "normalizedForm" : "も", "partOfSpeech" : "助詞,係助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "モ", "reading" : "モ", "termFrequency" : 1 }, { "token" : "立ち上げ", "start_offset" : 146, "end_offset" : 150, "type" : "word", "position" : 57, "aUnits" : null, "bUnits" : null, "baseForm" : "立ち上げる", "bytes" : "[e7 ab 8b e3 81 a1 e4 b8 8a e3 81 92]", "isOOV" : false, "normalizedForm" : "立ち上げる", "partOfSpeech" : "動詞,一般,*,*,下一段-ガ行,連用形-一般", "positionLength" : 1, "pronunciation" : "タチアゲ", "reading" : "タチアゲ", "termFrequency" : 1 }, { "token" : "まし", "start_offset" : 150, "end_offset" : 152, "type" : "word", "position" : 58, "aUnits" : null, "bUnits" : null, "baseForm" : "ます", "bytes" : "[e3 81 be e3 81 97]", "isOOV" : false, "normalizedForm" : "ます", "partOfSpeech" : "助動詞,*,*,*,助動詞-マス,連用形-一般", "positionLength" : 1, "pronunciation" : "マシ", "reading" : "マシ", "termFrequency" : 1 }, { "token" : "た", "start_offset" : 152, "end_offset" : 153, "type" : "word", "position" : 59, "aUnits" : null, "bUnits" : null, "baseForm" : "た", "bytes" : "[e3 81 9f]", "isOOV" : false, "normalizedForm" : "た", "partOfSpeech" : "助動詞,*,*,*,助動詞-タ,終止形-一般", "positionLength" : 1, "pronunciation" : "タ", "reading" : "タ", "termFrequency" : 1 }, { "token" : "興味", "start_offset" : 154, "end_offset" : 156, "type" : "word", "position" : 60, "aUnits" : null, "bUnits" : null, "baseForm" : "興味", "bytes" : "[e8 88 88 e5 91 b3]", "isOOV" : false, "normalizedForm" : "興味", "partOfSpeech" : "名詞,普通名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "キョウミ", "reading" : "キョウミ", "termFrequency" : 1 }, { "token" : "の", "start_offset" : 156, "end_offset" : 157, "type" : "word", "position" : 61, "aUnits" : null, "bUnits" : null, "baseForm" : "の", "bytes" : "[e3 81 ae]", "isOOV" : false, "normalizedForm" : "の", "partOfSpeech" : "助詞,格助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ノ", "reading" : "ノ", "termFrequency" : 1 }, { "token" : "ある", "start_offset" : 157, "end_offset" : 159, "type" : "word", "position" : 62, "aUnits" : null, "bUnits" : null, "baseForm" : "ある", "bytes" : "[e3 81 82 e3 82 8b]", "isOOV" : false, "normalizedForm" : "有る", "partOfSpeech" : "動詞,非自立可能,*,*,五段-ラ行,連体形-一般", "positionLength" : 1, "pronunciation" : "アル", "reading" : "アル", "termFrequency" : 1 }, { "token" : "ギーク", "start_offset" : 159, "end_offset" : 162, "type" : "word", "position" : 63, "aUnits" : null, "bUnits" : null, "baseForm" : "ギーク", "bytes" : "[e3 82 ae e3 83 bc e3 82 af]", "isOOV" : false, "normalizedForm" : "ギーク", "partOfSpeech" : "名詞,普通名詞,一般,*,*,*", "positionLength" : 1, "pronunciation" : "ギーク", "reading" : "ギーク", "termFrequency" : 1 }, { "token" : "は", "start_offset" : 162, "end_offset" : 163, "type" : "word", "position" : 64, "aUnits" : null, "bUnits" : null, "baseForm" : "は", "bytes" : "[e3 81 af]", "isOOV" : false, "normalizedForm" : "は", "partOfSpeech" : "助詞,係助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "ハ", "reading" : "ハ", "termFrequency" : 1 }, { "token" : "採用", "start_offset" : 163, "end_offset" : 165, "type" : "word", "position" : 65, "aUnits" : null, "bUnits" : null, "baseForm" : "採用", "bytes" : "[e6 8e a1 e7 94 a8]", "isOOV" : false, "normalizedForm" : "採用", "partOfSpeech" : "名詞,普通名詞,サ変可能,*,*,*", "positionLength" : 1, "pronunciation" : "サイヨウ", "reading" : "サイヨウ", "termFrequency" : 1 }, { "token" : "応募", "start_offset" : 165, "end_offset" : 167, "type" : "word", "position" : 66, "aUnits" : null, "bUnits" : null, "baseForm" : "応募", "bytes" : "[e5 bf 9c e5 8b 9f]", "isOOV" : false, "normalizedForm" : "応募", "partOfSpeech" : "名詞,普通名詞,サ変可能,*,*,*", "positionLength" : 1, "pronunciation" : "オウボ", "reading" : "オウボ", "termFrequency" : 1 }, { "token" : "お", "start_offset" : 167, "end_offset" : 168, "type" : "word", "position" : 67, "aUnits" : null, "bUnits" : null, "baseForm" : "お", "bytes" : "[e3 81 8a]", "isOOV" : false, "normalizedForm" : "御", "partOfSpeech" : "接頭辞,*,*,*,*,*", "positionLength" : 1, "pronunciation" : "オ", "reading" : "オ", "termFrequency" : 1 }, { "token" : "待ち", "start_offset" : 168, "end_offset" : 170, "type" : "word", "position" : 68, "aUnits" : null, "bUnits" : null, "baseForm" : "待つ", "bytes" : "[e5 be 85 e3 81 a1]", "isOOV" : false, "normalizedForm" : "待つ", "partOfSpeech" : "動詞,一般,*,*,五段-タ行,連用形-一般", "positionLength" : 1, "pronunciation" : "マチ", "reading" : "マチ", "termFrequency" : 1 }, { "token" : "し", "start_offset" : 170, "end_offset" : 171, "type" : "word", "position" : 69, "aUnits" : null, "bUnits" : null, "baseForm" : "する", "bytes" : "[e3 81 97]", "isOOV" : false, "normalizedForm" : "為る", "partOfSpeech" : "動詞,非自立可能,*,*,サ行変格,連用形-一般", "positionLength" : 1, "pronunciation" : "シ", "reading" : "シ", "termFrequency" : 1 }, { "token" : "て", "start_offset" : 171, "end_offset" : 172, "type" : "word", "position" : 70, "aUnits" : null, "bUnits" : null, "baseForm" : "て", "bytes" : "[e3 81 a6]", "isOOV" : false, "normalizedForm" : "て", "partOfSpeech" : "助詞,接続助詞,*,*,*,*", "positionLength" : 1, "pronunciation" : "テ", "reading" : "テ", "termFrequency" : 1 }, { "token" : "おり", "start_offset" : 172, "end_offset" : 174, "type" : "word", "position" : 71, "aUnits" : null, "bUnits" : null, "baseForm" : "おる", "bytes" : "[e3 81 8a e3 82 8a]", "isOOV" : false, "normalizedForm" : "居る", "partOfSpeech" : "動詞,非自立可能,*,*,五段-ラ行,連用形-一般", "positionLength" : 1, "pronunciation" : "オリ", "reading" : "オリ", "termFrequency" : 1 }, { "token" : "ます", "start_offset" : 174, "end_offset" : 176, "type" : "word", "position" : 72, "aUnits" : null, "bUnits" : null, "baseForm" : "ます", "bytes" : "[e3 81 be e3 81 99]", "isOOV" : false, "normalizedForm" : "ます", "partOfSpeech" : "助動詞,*,*,*,助動詞-マス,終止形-一般", "positionLength" : 1, "pronunciation" : "マス", "reading" : "マス", "termFrequency" : 1 } ] }, "tokenfilters" : [ ] } } |