Search the awesome-japanese-nlp-resources database for: "$ARGUMENTS"
Instructions
Step 0 — Validate input
If $ARGUMENTS is empty or blank, stop immediately and output:
Usage: /awesome-japanese-nlp-resources:search <query>
Examples:
/awesome-japanese-nlp-resources:search morphological analysis
/awesome-japanese-nlp-resources:search BERT
/awesome-japanese-nlp-resources:search named entity recognition
/awesome-japanese-nlp-resources:search text classification dataset
/awesome-japanese-nlp-resources:search sentence embedding
Please pass the keyword(s) you want to search for as the argument.
---
使い方: /awesome-japanese-nlp-resources:search <query>
クエリ例:
/awesome-japanese-nlp-resources:search 形態素解析
/awesome-japanese-nlp-resources:search BERT
/awesome-japanese-nlp-resources:search 固有表現認識
/awesome-japanese-nlp-resources:search テキスト分類 データセット
/awesome-japanese-nlp-resources:search 文埋め込み
検索したいキーワードを引数に指定してください。
Do not proceed to Step 1 if $ARGUMENTS is empty.
Step 1 — Interpret the query
The user's query is: "$ARGUMENTS"
The data descriptions are in English, so always convert the query intent to English keywords before searching.
Keyword rules — read before choosing keywords:
- Use stems, not full words. Substring match is used, so
morpholog catches "morphology", "morphological", "morphological analyzer". Other examples: embed → embedding/embeddings, classif → classification/classifier, translat → translation/translate, generat → generation/generative, segment → segmentation/segmenter, recogni → recognition/recognizer, extract → extraction/extractor, retriev → retrieval/retrieve.
- Add domain-specific tool names. When the query maps to a known NLP domain, include the well-known tool names present in the database:
| Domain (Japanese query hint) |
Stem keywords |
Tool names to add |
| 形態素解析 / morphological analysis |
morpholog, segment |
mecab, janome, sudachi, kytea, kuromoji, jumanpp, nagisa |
| 固有表現認識 / NER |
named entit, NER, recogni |
ginza, spacy, knp |
| 係り受け解析 / dependency parsing |
depend, parse, syntax |
cabocha, knp, ginza, spacy |
| 文章分類 / text classification |
classif, sentiment, categor |
bert, fasttext |
| 感情分析 / sentiment analysis |
sentiment, emotion, opinion |
oseti, wrime |
| 埋め込み / word vectors / embeddings |
embed, vector, represent |
word2vec, fasttext, bert, sbert |
| 事前学習モデル / pretrained model |
pretrain, language model, bert, gpt |
bert, gpt, llama, rinna, elyza, calm, swallow |
| テキスト生成 / text generation |
generat, language model |
gpt, llm, llama, rinna, elyza |
| 機械翻訳 / machine translation |
translat, machine translation |
opus, marian, fairseq |
| 音声認識 / speech recognition |
speech, recogni, audio, asr |
whisper, julius, espnet |
| 音声合成 / text-to-speech |
speech, synthesis, tts |
voicevox, espnet |
| 質問応答 / QA |
question, answer, qa |
bert, t5 |
| 要約 / summarization |
summari, abstract |
bart, t5, pegasus |
| 辞書・IME / dictionary |
dict, lexicon, ime |
mecab, sudachi, mozc |
| コーパス・データセット / corpus |
corpus, dataset, annot |
(rely on stems) |
| チュートリアル / learning |
tutorial, introduc, learn |
(rely on stems) |
| OCR / 光学文字認識 |
ocr, optical character, recogni |
manga-ocr, donut, tesseract |
| RAG / 検索拡張生成 |
retriev, rag, embed |
ruri, glucose, faiss |
| ファインチューニング / fine-tuning |
fine-tun, finetun, lora, peft |
lora, peft, qlora |
| ベンチマーク・評価 / benchmark |
benchmark, evaluat, jglue |
llm-jp-eval, jglue, nejumi |
- Aim for 4–6 keywords. Fewer miss items; more than 6 inflates low-quality partial matches.
- If none of the above domains fit, translate the query intent literally to English stems.
Step 2 — Locate the data file
The data file ships with the plugin. Resolve its path via ${CLAUDE_PLUGIN_ROOT} (Claude Code substitutes this inline in skill content), falling back to a scoped search only if the install is unusual:
RESOURCES_PATH="${CLAUDE_PLUGIN_ROOT}/data/resources.json"
[ -f "$RESOURCES_PATH" ] || RESOURCES_PATH="$(find "${HOME}/.claude/plugins" -type f -name resources.json 2>/dev/null | grep "awesome-japanese-nlp-resources/" | head -1)"
echo "RESOURCES_PATH=$RESOURCES_PATH"
Use the resulting absolute RESOURCES_PATH wherever Step 3 opens the data file.
Step 3 — Search and score via Bash
Do NOT use the Read tool — the file exceeds the Read tool's size limit and would consume ~64K tokens unnecessarily. Instead, run the scoring in a single Bash call using Python.
Each item in the JSON array has:
u: GitHub or Hugging Face URL
n: repository/model name
d: description (English for most items; some Japanese-only items have Japanese descriptions)
c: category (e.g. Python library, HuggingFace Model (Text Generation), Corpus, Tutorial, ...)
s: subcategory / semantic labels (comma-separated)
st: GitHub star count (GitHub items only; absent or 0 otherwise)
ns: normalized star score 0–10 (log-scaled, GitHub items only)
dl: Hugging Face download count (HF items only; absent or 0 otherwise)
nd: normalized download score 0–10 (log-scaled, HF items only)
sc: pre-computed quality score (higher = more popular/active)
Run the following, substituting KEYWORDS with your English keywords list from Step 1:
python3 << 'EOF'
import json
with open("RESOURCES_PATH") as f: # absolute path from Step 2
data = json.load(f)
keywords = ["keyword1", "keyword2", "keyword3"] # from Step 1
results = []
for item in data:
n = item.get("n", "").lower()
d = item.get("d", "").lower()
s = item.get("s", "").lower()
c = item.get("c", "").lower()
text_score = 0
for kw in keywords:
kw = kw.lower()
if n == kw: text_score += 20
elif kw in n: text_score += 10
if kw in d: text_score += 5
if kw in s: text_score += 3
if kw in c: text_score += 2
if text_score < 8:
continue
ns = item.get("ns") or 0
nd = item.get("nd") or 0
sc = item.get("sc") or 0
pop = (ns if ns else nd) * 2.5
qual = min(5, sc * 5 / 21)
combined = text_score + pop + qual
results.append((combined, text_score, item))
results.sort(key=lambda x: -x[0])
seen = {item['n'] for _, _, item in results}
# Supplemental pass: surface high-popularity items from matching categories
# that may have been missed because their descriptions are in Japanese.
# Keys are stems to match against user keywords; values are category prefixes
# (prefix match covers "HuggingFace Model (Text Generation)" etc.).
CATEGORY_KEYWORDS = {
"tutorial": "Tutorial", "introduc": "Tutorial", "learn": "Tutorial",
"morpholog": "Python library", "segment": "Python library",
"mecab": "Python library", "janome": "Python library", "sudachi": "Python library",
"spacy": "Python library", "ginza": "Python library",
"corpus": "Corpus", "dataset": "Corpus",
"bert": "HuggingFace Model", "gpt": "HuggingFace Model",
"llm": "HuggingFace Model", "llama": "HuggingFace Model",
"pretrain": "HuggingFace Model", "embed": "HuggingFace Model",
"model": "Pretrained model",
}
supplement_cats = set()
for kw in keywords:
for ck, cat in CATEGORY_KEYWORDS.items():
if ck in kw.lower():
supplement_cats.add(cat)
if supplement_cats:
def cat_match(c):
return any(c == cat or c.startswith(cat + " ") for cat in supplement_cats)
extras = [
item for item in data
if cat_match(item.get("c", ""))
and (item.get("st", 0) or item.get("dl", 0))
and item["n"] not in seen
]
extras.sort(key=lambda x: -max(x.get("ns") or 0, x.get("nd") or 0))
for item in extras[:5]:
ns = item.get("ns") or 0
nd = item.get("nd") or 0
sc = item.get("sc") or 0
# base 8 = category-match credit (same as the text_score threshold)
combined = 8 + max(ns, nd) * 2.5 + min(5, sc * 5 / 21)
results.append((combined, 0, item))
seen.add(item["n"])
results.sort(key=lambda x: -x[0])
for combined, text_score, item in results[:20]:
st = item.get("st", 0) or 0
dl = item.get("dl", 0) or 0
flag = " [supplemental]" if text_score == 0 else ""
print(f"score={combined:.1f} text={text_score} st={st} dl={dl}{flag}")
print(f" n={item['n']}")
print(f" u={item['u']}")
print(f" c={item['c']}")
print(f" s={item.get('s','')}")
print(f" d={item.get('d','')[:120]}")
print()
EOF
This returns up to 20 candidates. Items marked [supplemental] were added by the category-based pass to recover high-star resources whose descriptions are in Japanese. In Step 4, evaluate supplemental items on semantic fit before including them in the final list.
Step 4 — Re-rank with your judgment
You now have up to 20 candidates. Apply your semantic judgment to produce the final ordered list of up to 10 results.
Re-rank by evaluating each candidate on:
- Semantic centrality — how directly does this resource address the query's core intent? A BERT model is more central to "BERT fine-tuning" than a generic transformer library.
- Popularity as a proxy for quality — high stars/downloads generally signal battle-tested, well-documented tools. Prefer them when candidates are otherwise equivalent.
- Category fit — match the resource type to the implied need:
- "how to learn / 勉強" → prefer
Tutorial, Research summary
- "I need a model" → prefer
Pretrained model, HuggingFace Model
- "find a dataset / コーパス" → prefer
Corpus, HuggingFace Dataset
- "build an app / ライブラリ" → prefer
Python library, language-specific libs
- Specificity — a resource specialized for the exact task beats a general one.
- Recency signal — when
sc is significantly higher among otherwise-similar items, it usually reflects more recent activity; prefer those.
Do not mechanically follow the combined score from Step 3 — use it as a starting point, then move items up or down based on the criteria above.
Step 5 — Format the output
Language detection rule (apply before writing any output):
$ARGUMENTS contains Japanese characters (hiragana / katakana / kanji) → Japanese
- Otherwise → English (default)
Apply the detected language to all headings and prose.
Present the final re-ranked results:
## Search results for "$ARGUMENTS"
*(Searched for: keyword1, keyword2, ...)*
Found N result(s).
### 1. [repository-name](url)
**Category:** category > subcategory
**Popularity:** ⭐ {st} stars (or 📥 {dl} downloads for HF)
Description text here.
### 2. ...
If no results, suggest alternate keywords and link to:
https://github.com/taishi-i/awesome-japanese-nlp-resources
Step 6 — Output use-case selection guide table
After the search results list, append a guide table that helps the user pick the right resource for their specific situation.
Match the section heading and table language to the query language — translate the heading and column headers into the query language (e.g. Japanese query → Japanese heading and headers).
## Use-case Selection Guide
| Use case | Recommended | Popularity | Why |
|---|---|---|---|
| ... | [name](url) | ⭐N or 📥N | short reason |
Rules:
- List 3–6 distinct use cases derived from the top 10 results. Each row should represent a meaningfully different scenario (e.g., "fine-tune an LLM" vs "evaluate an LLM"), not just a restatement of the search query.
- For each row, select the single best resource from the top 10 results.
- Popularity column: use
⭐{st} for GitHub stars, 📥{dl} for HuggingFace downloads. If both are 0, omit.
- Why: write a 10–15 word reason in the query language explaining why this resource is the best fit for that use case. Do not copy the description verbatim. Focus on the practical benefit.
- If two use cases would map to the same resource, merge them into one row or drop the weaker one.
- If there are fewer than 3 meaningfully distinct use cases in the results, output as many rows as make sense (minimum 1).
1---2name: taishi-i-awesome-japanese-nlp-resources-33description: Search all Japanese NLP resources (libraries, models, datasets, tutorials, dictionaries, Hugging Face). Accepts keywords or natural language questions in any language.4---56Search the awesome-japanese-nlp-resources database for: "$ARGUMENTS"78## Instructions910### Step 0 — Validate input1112If `$ARGUMENTS` is empty or blank, **stop immediately** and output:1314```15Usage: /awesome-japanese-nlp-resources:search <query>1617Examples:18 /awesome-japanese-nlp-resources:search morphological analysis19 /awesome-japanese-nlp-resources:search BERT20 /awesome-japanese-nlp-resources:search named entity recognition21 /awesome-japanese-nlp-resources:search text classification dataset22 /awesome-japanese-nlp-resources:search sentence embedding2324Please pass the keyword(s) you want to search for as the argument.2526---2728使い方: /awesome-japanese-nlp-resources:search <query>2930クエリ例:31 /awesome-japanese-nlp-resources:search 形態素解析32 /awesome-japanese-nlp-resources:search BERT33 /awesome-japanese-nlp-resources:search 固有表現認識34 /awesome-japanese-nlp-resources:search テキスト分類 データセット35 /awesome-japanese-nlp-resources:search 文埋め込み3637検索したいキーワードを引数に指定してください。38```3940Do **not** proceed to Step 1 if `$ARGUMENTS` is empty.4142### Step 1 — Interpret the query4344The user's query is: "$ARGUMENTS"4546The data descriptions are in **English**, so always convert the query intent to English keywords before searching.4748**Keyword rules — read before choosing keywords:**491. **Use stems, not full words.** Substring match is used, so `morpholog` catches "morphology", "morphological", "morphological analyzer". Other examples: `embed` → embedding/embeddings, `classif` → classification/classifier, `translat` → translation/translate, `generat` → generation/generative, `segment` → segmentation/segmenter, `recogni` → recognition/recognizer, `extract` → extraction/extractor, `retriev` → retrieval/retrieve.502. **Add domain-specific tool names.** When the query maps to a known NLP domain, include the well-known tool names present in the database:5152| Domain (Japanese query hint) | Stem keywords | Tool names to add |53|---|---|---|54| 形態素解析 / morphological analysis | `morpholog`, `segment` | `mecab`, `janome`, `sudachi`, `kytea`, `kuromoji`, `jumanpp`, `nagisa` |55| 固有表現認識 / NER | `named entit`, `NER`, `recogni` | `ginza`, `spacy`, `knp` |56| 係り受け解析 / dependency parsing | `depend`, `parse`, `syntax` | `cabocha`, `knp`, `ginza`, `spacy` |57| 文章分類 / text classification | `classif`, `sentiment`, `categor` | `bert`, `fasttext` |58| 感情分析 / sentiment analysis | `sentiment`, `emotion`, `opinion` | `oseti`, `wrime` |59| 埋め込み / word vectors / embeddings | `embed`, `vector`, `represent` | `word2vec`, `fasttext`, `bert`, `sbert` |60| 事前学習モデル / pretrained model | `pretrain`, `language model`, `bert`, `gpt` | `bert`, `gpt`, `llama`, `rinna`, `elyza`, `calm`, `swallow` |61| テキスト生成 / text generation | `generat`, `language model` | `gpt`, `llm`, `llama`, `rinna`, `elyza` |62| 機械翻訳 / machine translation | `translat`, `machine translation` | `opus`, `marian`, `fairseq` |63| 音声認識 / speech recognition | `speech`, `recogni`, `audio`, `asr` | `whisper`, `julius`, `espnet` |64| 音声合成 / text-to-speech | `speech`, `synthesis`, `tts` | `voicevox`, `espnet` |65| 質問応答 / QA | `question`, `answer`, `qa` | `bert`, `t5` |66| 要約 / summarization | `summari`, `abstract` | `bart`, `t5`, `pegasus` |67| 辞書・IME / dictionary | `dict`, `lexicon`, `ime` | `mecab`, `sudachi`, `mozc` |68| コーパス・データセット / corpus | `corpus`, `dataset`, `annot` | *(rely on stems)* |69| チュートリアル / learning | `tutorial`, `introduc`, `learn` | *(rely on stems)* |70| OCR / 光学文字認識 | `ocr`, `optical character`, `recogni` | `manga-ocr`, `donut`, `tesseract` |71| RAG / 検索拡張生成 | `retriev`, `rag`, `embed` | `ruri`, `glucose`, `faiss` |72| ファインチューニング / fine-tuning | `fine-tun`, `finetun`, `lora`, `peft` | `lora`, `peft`, `qlora` |73| ベンチマーク・評価 / benchmark | `benchmark`, `evaluat`, `jglue` | `llm-jp-eval`, `jglue`, `nejumi` |74753. **Aim for 4–6 keywords.** Fewer miss items; more than 6 inflates low-quality partial matches.764. **If none of the above domains fit**, translate the query intent literally to English stems.7778### Step 2 — Locate the data file7980The data file ships with the plugin. Resolve its path via `${CLAUDE_PLUGIN_ROOT}` (Claude Code substitutes this inline in skill content), falling back to a scoped search only if the install is unusual:8182```bash83RESOURCES_PATH="${CLAUDE_PLUGIN_ROOT}/data/resources.json"84[ -f "$RESOURCES_PATH" ] || RESOURCES_PATH="$(find "${HOME}/.claude/plugins" -type f -name resources.json 2>/dev/null | grep "awesome-japanese-nlp-resources/" | head -1)"85echo "RESOURCES_PATH=$RESOURCES_PATH"86```8788Use the resulting absolute `RESOURCES_PATH` wherever Step 3 opens the data file.8990### Step 3 — Search and score via Bash9192**Do NOT use the Read tool** — the file exceeds the Read tool's size limit and would consume ~64K tokens unnecessarily. Instead, run the scoring in a single Bash call using Python.9394Each item in the JSON array has:95- `u`: GitHub or Hugging Face URL96- `n`: repository/model name97- `d`: description (English for most items; some Japanese-only items have Japanese descriptions)98- `c`: category (e.g. `Python library`, `HuggingFace Model (Text Generation)`, `Corpus`, `Tutorial`, ...)99- `s`: subcategory / semantic labels (comma-separated)100- `st`: GitHub star count (GitHub items only; absent or 0 otherwise)101- `ns`: normalized star score 0–10 (log-scaled, GitHub items only)102- `dl`: Hugging Face download count (HF items only; absent or 0 otherwise)103- `nd`: normalized download score 0–10 (log-scaled, HF items only)104- `sc`: pre-computed quality score (higher = more popular/active)105106Run the following, substituting `KEYWORDS` with your English keywords list from Step 1:107108```python109python3 << 'EOF'110import json111112with open("RESOURCES_PATH") as f: # absolute path from Step 2113 data = json.load(f)114115keywords = ["keyword1", "keyword2", "keyword3"] # from Step 1116117results = []118for item in data:119 n = item.get("n", "").lower()120 d = item.get("d", "").lower()121 s = item.get("s", "").lower()122 c = item.get("c", "").lower()123124 text_score = 0125 for kw in keywords:126 kw = kw.lower()127 if n == kw: text_score += 20128 elif kw in n: text_score += 10129 if kw in d: text_score += 5130 if kw in s: text_score += 3131 if kw in c: text_score += 2132133 if text_score < 8:134 continue135136 ns = item.get("ns") or 0137 nd = item.get("nd") or 0138 sc = item.get("sc") or 0139 pop = (ns if ns else nd) * 2.5140 qual = min(5, sc * 5 / 21)141 combined = text_score + pop + qual142143 results.append((combined, text_score, item))144145results.sort(key=lambda x: -x[0])146seen = {item['n'] for _, _, item in results}147148# Supplemental pass: surface high-popularity items from matching categories149# that may have been missed because their descriptions are in Japanese.150# Keys are stems to match against user keywords; values are category prefixes151# (prefix match covers "HuggingFace Model (Text Generation)" etc.).152CATEGORY_KEYWORDS = {153 "tutorial": "Tutorial", "introduc": "Tutorial", "learn": "Tutorial",154 "morpholog": "Python library", "segment": "Python library",155 "mecab": "Python library", "janome": "Python library", "sudachi": "Python library",156 "spacy": "Python library", "ginza": "Python library",157 "corpus": "Corpus", "dataset": "Corpus",158 "bert": "HuggingFace Model", "gpt": "HuggingFace Model",159 "llm": "HuggingFace Model", "llama": "HuggingFace Model",160 "pretrain": "HuggingFace Model", "embed": "HuggingFace Model",161 "model": "Pretrained model",162}163supplement_cats = set()164for kw in keywords:165 for ck, cat in CATEGORY_KEYWORDS.items():166 if ck in kw.lower():167 supplement_cats.add(cat)168169if supplement_cats:170 def cat_match(c):171 return any(c == cat or c.startswith(cat + " ") for cat in supplement_cats)172 extras = [173 item for item in data174 if cat_match(item.get("c", ""))175 and (item.get("st", 0) or item.get("dl", 0))176 and item["n"] not in seen177 ]178 extras.sort(key=lambda x: -max(x.get("ns") or 0, x.get("nd") or 0))179 for item in extras[:5]:180 ns = item.get("ns") or 0181 nd = item.get("nd") or 0182 sc = item.get("sc") or 0183 # base 8 = category-match credit (same as the text_score threshold)184 combined = 8 + max(ns, nd) * 2.5 + min(5, sc * 5 / 21)185 results.append((combined, 0, item))186 seen.add(item["n"])187188results.sort(key=lambda x: -x[0])189for combined, text_score, item in results[:20]:190 st = item.get("st", 0) or 0191 dl = item.get("dl", 0) or 0192 flag = " [supplemental]" if text_score == 0 else ""193 print(f"score={combined:.1f} text={text_score} st={st} dl={dl}{flag}")194 print(f" n={item['n']}")195 print(f" u={item['u']}")196 print(f" c={item['c']}")197 print(f" s={item.get('s','')}")198 print(f" d={item.get('d','')[:120]}")199 print()200EOF201```202203This returns up to 20 candidates. Items marked `[supplemental]` were added by the category-based pass to recover high-star resources whose descriptions are in Japanese. In Step 4, evaluate supplemental items on semantic fit before including them in the final list.204205### Step 4 — Re-rank with your judgment206207You now have up to 20 candidates. Apply your semantic judgment to produce the final ordered list of up to **10** results.208209Re-rank by evaluating each candidate on:2101. **Semantic centrality** — how directly does this resource address the query's core intent? A BERT model is more central to "BERT fine-tuning" than a generic transformer library.2112. **Popularity as a proxy for quality** — high stars/downloads generally signal battle-tested, well-documented tools. Prefer them when candidates are otherwise equivalent.2123. **Category fit** — match the resource type to the implied need:213 - "how to learn / 勉強" → prefer `Tutorial`, `Research summary`214 - "I need a model" → prefer `Pretrained model`, `HuggingFace Model`215 - "find a dataset / コーパス" → prefer `Corpus`, `HuggingFace Dataset`216 - "build an app / ライブラリ" → prefer `Python library`, language-specific libs2174. **Specificity** — a resource specialized for the exact task beats a general one.2185. **Recency signal** — when `sc` is significantly higher among otherwise-similar items, it usually reflects more recent activity; prefer those.219220Do not mechanically follow the combined score from Step 3 — use it as a starting point, then move items up or down based on the criteria above.221222### Step 5 — Format the output223224**Language detection rule (apply before writing any output):**225- `$ARGUMENTS` contains Japanese characters (hiragana / katakana / kanji) → **Japanese**226- Otherwise → **English** (default)227228Apply the detected language to all headings and prose.229230Present the final re-ranked results:231232```233## Search results for "$ARGUMENTS"234235*(Searched for: keyword1, keyword2, ...)*236237Found N result(s).238239### 1. [repository-name](url)240**Category:** category > subcategory241**Popularity:** ⭐ {st} stars (or 📥 {dl} downloads for HF)242Description text here.243244### 2. ...245```246247If no results, suggest alternate keywords and link to:248https://github.com/taishi-i/awesome-japanese-nlp-resources249250### Step 6 — Output use-case selection guide table251252After the search results list, append a guide table that helps the user pick the right resource for their specific situation.253254**Match the section heading and table language to the query language** — translate the heading and column headers into the query language (e.g. Japanese query → Japanese heading and headers).255256```257## Use-case Selection Guide258259| Use case | Recommended | Popularity | Why |260|---|---|---|---|261| ... | [name](url) | ⭐N or 📥N | short reason |262```263264**Rules:**265- List **3–6 distinct use cases** derived from the top 10 results. Each row should represent a meaningfully different scenario (e.g., "fine-tune an LLM" vs "evaluate an LLM"), not just a restatement of the search query.266- For each row, select the **single best resource** from the top 10 results.267- **Popularity column**: use `⭐{st}` for GitHub stars, `📥{dl}` for HuggingFace downloads. If both are 0, omit.268- **Why**: write a 10–15 word reason in the query language explaining why this resource is the best fit for that use case. Do not copy the description verbatim. Focus on the practical benefit.269- If two use cases would map to the same resource, merge them into one row or drop the weaker one.270- If there are fewer than 3 meaningfully distinct use cases in the results, output as many rows as make sense (minimum 1).