Linux command
ots 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Summarize
ots [path/to/file.txt]
Summarize
ots -r [10] [path/to/file.txt]
Summarize
ots -r [15] -o [summary.txt] [path/to/file.txt]
Generate
ots --html --out=[summary.html] [path/to/file.txt]
Extract
ots --about [path/to/file.txt]
Summarize
ots --dic=[de] [path/to/file.txt]
Summarize
cat [path/to/file.txt] | ots -r [10]
说明
ots (Open Text Summarizer) is an automatic text summarization tool that reads a document, determines which sentences are most important, and produces a condensed version. It performs extractive summarization, selecting and preserving original sentences rather than generating new prose. The tool works in three stages: first it filters common stop words using XML-based language dictionaries, then performs term frequency analysis to score sentences by density of significant words, and finally applies linguistic refinement using the Porter Stemming Algorithm to group word variants. It supports 37+ languages via XML dictionary files. Output can be plain text or HTML with important sentences highlighted.
参数
- -r _INT_, --ratio=_INT_
- Summarization percentage; sets output length as a percentage of the input. Default: 20.
- -o _FILE_, --out=_FILE_
- Output file path. Default: stdout.
- -h, --html
- Output as HTML with important sentences highlighted
- -a, --about
- Output only keyword and topic extraction (useful for generating meta-tag content)
- -d _STRING_, --dic=_STRING_
- Specify a custom dictionary/language file for stop-word filtering
- -v, --version
- Display version information
- -?, --help
- Display help/usage information
FAQ
What is the ots command used for?
ots (Open Text Summarizer) is an automatic text summarization tool that reads a document, determines which sentences are most important, and produces a condensed version. It performs extractive summarization, selecting and preserving original sentences rather than generating new prose. The tool works in three stages: first it filters common stop words using XML-based language dictionaries, then performs term frequency analysis to score sentences by density of significant words, and finally applies linguistic refinement using the Porter Stemming Algorithm to group word variants. It supports 37+ languages via XML dictionary files. Output can be plain text or HTML with important sentences highlighted.
How do I run a basic ots example?
Run `ots [path/to/file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -r _INT_, --ratio=_INT_ do in ots?
Summarization percentage; sets output length as a percentage of the input. Default: 20.