Salvato in:
Dettagli Bibliografici
Autori principali: Deguchi, Hiroyuki, Kamoda, Go, Matsushita, Yusuke, Taguchi, Chihiro, Suenaga, Kohei, Waga, Masaki, Yokoi, Sho
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:https://arxiv.org/abs/2503.03703
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910859750539264
author Deguchi, Hiroyuki
Kamoda, Go
Matsushita, Yusuke
Taguchi, Chihiro
Suenaga, Kohei
Waga, Masaki
Yokoi, Sho
author_facet Deguchi, Hiroyuki
Kamoda, Go
Matsushita, Yusuke
Taguchi, Chihiro
Suenaga, Kohei
Waga, Masaki
Yokoi, Sho
contents Researchers and practitioners in natural language processing and computational linguistics frequently observe and analyze the real language usage in large-scale corpora. For that purpose, they often employ off-the-shelf pattern-matching tools, such as grep, and keyword-in-context concordancers, which is widely used in corpus linguistics for gathering examples. Nonetheless, these existing techniques rely on surface-level string matching, and thus they suffer from the major limitation of not being able to handle orthographic variations and paraphrasing -- notable and common phenomena in any natural language. In addition, existing continuous approaches such as dense vector search tend to be overly coarse, often retrieving texts that are unrelated but share similar topics. Given these challenges, we propose a novel algorithm that achieves \emph{soft} (or semantic) yet efficient pattern matching by relaxing a surface-level matching with word embeddings. Our algorithm is highly scalable with respect to the size of the corpus text utilizing inverted indexes. We have prepared an efficient implementation, and we provide an accessible web tool. Our experiments demonstrate that the proposed method (i) can execute searches on billion-scale corpora in less than a second, which is comparable in speed to surface-level string matching and dense vector search; (ii) can extract harmful instances that semantically match queries from a large set of English and Japanese Wikipedia articles; and (iii) can be effectively applied to corpus-linguistic analyses of Latin, a language with highly diverse inflections.
format Preprint
id arxiv_https___arxiv_org_abs_2503_03703
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SoftMatcha: A Soft and Fast Pattern Matcher for Billion-Scale Corpus Searches
Deguchi, Hiroyuki
Kamoda, Go
Matsushita, Yusuke
Taguchi, Chihiro
Suenaga, Kohei
Waga, Masaki
Yokoi, Sho
Computation and Language
Researchers and practitioners in natural language processing and computational linguistics frequently observe and analyze the real language usage in large-scale corpora. For that purpose, they often employ off-the-shelf pattern-matching tools, such as grep, and keyword-in-context concordancers, which is widely used in corpus linguistics for gathering examples. Nonetheless, these existing techniques rely on surface-level string matching, and thus they suffer from the major limitation of not being able to handle orthographic variations and paraphrasing -- notable and common phenomena in any natural language. In addition, existing continuous approaches such as dense vector search tend to be overly coarse, often retrieving texts that are unrelated but share similar topics. Given these challenges, we propose a novel algorithm that achieves \emph{soft} (or semantic) yet efficient pattern matching by relaxing a surface-level matching with word embeddings. Our algorithm is highly scalable with respect to the size of the corpus text utilizing inverted indexes. We have prepared an efficient implementation, and we provide an accessible web tool. Our experiments demonstrate that the proposed method (i) can execute searches on billion-scale corpora in less than a second, which is comparable in speed to surface-level string matching and dense vector search; (ii) can extract harmful instances that semantically match queries from a large set of English and Japanese Wikipedia articles; and (iii) can be effectively applied to corpus-linguistic analyses of Latin, a language with highly diverse inflections.
title SoftMatcha: A Soft and Fast Pattern Matcher for Billion-Scale Corpus Searches
topic Computation and Language
url https://arxiv.org/abs/2503.03703