# Cerca un termine in giapponese

**URL:** <https://meta.discourse.org/t/search-a-term-in-japanese/97359>\
**Category:** Product Support\
**Created:** [17 Settembre 2018, 1:58pm UTC](https://meta.discourse.org/t/search-a-term-in-japanese/97359 "2018-09-17T13:58:22Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![yashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yashi/32/241984_2.png) [@yashi](https://meta.discourse.org/u/yashi)\
**Post date:** [2 Febbraio 2022, 10:58am UTC](https://meta.discourse.org/t/search-a-term-in-japanese/97359/30 "2022-02-02T10:58:57Z")

</div>

Ho provato [tiny\_segmenter](https://rubygems.org/gems/tiny_segmenter) da Rubygems e almeno genera le parole che ho elencato nel commento precedente.

```ruby
# coding: utf-8
require 'tiny_segmenter'
require 'pp'

s = File.read('topic27.txt')

ts = TinySegmenter.new
sg = ts.segment(s, ignore_punctuation: true)
pp(sg)

```

```shell
bundle exec ruby test.rb | grep -e 北側 -e 真上 -e 一般
 "北側",
 "真上",
 "一般",
 "一般",
 "一般",
 "北側",
 "一般",

```

Una rapida ricerca su TinySegmenter mi ha detto che il modello che utilizza non è così buono. Esiste un generatore di modelli per esso.

> **[GitHub - shogo82148/TinySegmenterMaker](https://github.com/shogo82148/TinySegmenterMaker)**
>
> Contribute to shogo82148/TinySegmenterMaker development by creating an account on GitHub.

Non l’ho ancora provato.

---

_[View the full topic](https://meta.discourse.org/t/search-a-term-in-japanese/97359)._
