--- license: mit tags: - stopwords - japanese - nlp - text-processing - tokenization - nagisa pretty_name: Japanese Stopwords for nagisa size_categories: - n<1K language: - ja task_categories: - text-classification - feature-extraction dataset_info: features: - name: words dtype: string - name: postags dtype: string splits: - name: nagisa_stopwords num_examples: 147 configs: - config_name: default data_files: - split: nagisa_stopwords path: nagisa_stopwords.csv --- # Japanese Stopwords for nagisa This dataset is the Japanese stopwords list built into [nagisa](https://github.com/taishi-i/nagisa) (v0.2.12+). It is published here on Hugging Face for easy access and reproducibility. ## Overview | | | |---|---| | Language | Japanese | | Size | 147 words | | Source | [CC-100](https://data.statmt.org/cc-100/), [Wikipedia](https://dumps.wikimedia.org/other/cirrussearch/) | | License | MIT | ## Dataset Description This dataset contains **147 frequently used Japanese words** extracted from large-scale corpora. Each word is annotated with its part-of-speech (POS) tag according to nagisa's tokenization rules. Since nagisa v0.2.12, this stopwords list is included by default and can be accessed directly via `nagisa.stopwords`. The list was expanded from 100 to 147 words, with additional POS categories (代名詞, 接続詞) to improve coverage. The stopwords are constructed from the following sources: - [CC-100 dataset](https://data.statmt.org/cc-100/) - Monolingual datasets from Common Crawl - [Wikipedia](https://dumps.wikimedia.org/other/cirrussearch/) - Japanese Wikipedia dumps ## Usage ### Using with nagisa (Recommended) Since nagisa v0.2.12, stopwords are built-in. No additional installation is required. ```python import nagisa # Tokenize text text = "日本語のストップワードを簡単に利用できます。" tokens = nagisa.tagging(text) print(tokens.words) # ['日本', '語', 'の', 'ストップ', 'ワード', 'を', '簡単', 'に', '利用', 'でき', 'ます', '。'] # Filter stopwords words = [word for word in tokens.words if word not in nagisa.stopwords] print(words) # ['日本', '語', 'ストップ', 'ワード', '簡単', '利用', '。'] ``` ### Using with Hugging Face Datasets ```bash pip install datasets ``` This dataset requires `datasets >= 2.10.0`. ```python from datasets import load_dataset dataset = load_dataset("taishi-i/nagisa_stopwords") # Get stopwords words = dataset["nagisa_stopwords"]["words"] # Get the part-of-speech tags postags = dataset["nagisa_stopwords"]["postags"] ``` ### Example: Filtering Stopwords from Text ```python import nagisa from datasets import load_dataset # Load stopwords dataset = load_dataset("taishi-i/nagisa_stopwords") stopwords = set(dataset["nagisa_stopwords"]["words"]) # Tokenize and filter text = "東京で美味しいラーメンを食べました" tokens = nagisa.tagging(text) print(tokens.words) # ['東京', 'で', '美味しい', 'ラーメン', 'を', '食べ', 'まし', 'た'] filtered_words = [word for word in tokens.words if word not in stopwords] print(filtered_words) # ['東京', '美味しい', 'ラーメン', '食べ'] ``` ### Data Fields | Field | Type | Description | |-------|------|-------------| | `words` | string | Japanese word or character | | `postags` | string | Part-of-speech tag in Japanese | ### Part-of-Speech Tags The dataset includes the following POS tags: | POS Tag | English | Count | |---------|-----------------|-------| | 助動詞 | Auxiliary Verb | 37 | | 助詞 | Particle | 35 | | 動詞 | Verb | 24 | | 名詞 | Noun | 13 | | 代名詞 | Pronoun | 13 | | 接続詞 | Conjunction | 9 | | 接尾辞 | Suffix | 5 | | 副詞 | Adverb | 3 | | 接頭辞 | Prefix | 2 | | 連体詞 | Adnominal | 2 | | 感動詞 | Interjection | 2 | | 形状詞 | Adjectival Noun | 1 | | 空白 | Whitespace | 1 | ### Sample Data | words | postags | |-------|---------| | の | 助詞 | | て | 助詞 | | に | 助詞 | | を | 助詞 | | が | 助詞 | | は | 助詞 | | と | 助詞 | | た | 助動詞 | | し | 動詞 | | で | 助詞 | ## Use Cases - **Text preprocessing**: Remove common words before text analysis - **Feature extraction**: Reduce noise in bag-of-words or TF-IDF representations - **Search optimization**: Filter out stopwords from search queries - **Text classification**: Improve model performance by removing non-informative words ## Related Resources - [nagisa](https://github.com/taishi-i/nagisa) - Japanese tokenizer based on RNN - [CC-100](https://data.statmt.org/cc-100/) - Monolingual datasets from Common Crawl - [Wikipedia Dumps](https://dumps.wikimedia.org/) - Wikipedia database dumps ## Citation If you use this dataset, please cite: ```bibtex @misc{nagisa_stopwords, author = {Taishi Ikeda}, title = {Japanese Stopwords for nagisa}, year = {2023}, publisher = {Hugging Face}, url = {https://huggingface.co/datasets/taishi-i/nagisa_stopwords} } ```