# nvim_1Clause_1Line **Repository Path**: llwwff/nvim_1Clause_1Line ## Basic Information - **Project Name**: nvim_1Clause_1Line - **Description**: 一行一个分句, 方便理解与抽取信息 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-05-02 - **Last Updated**: 2023-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## why To make long sentences, which may contain long clauses, easier to understand, especially for Chinese people, this plugin uses spaCy, a NLP lib written in python code, to split the text. For a paragraph of long sentences, the plugin will insert line break at punctuations and stopwords, which can be configured, to get only 1 clause per line. ## setup ``` pip3 install spacy python3 -m spacy download en_core_web_sm brew install apache-opennlp ``` ## usage - use opennlp: `opennlp SentenceDetector openNLP_en_sentence.bin 2>/dev/null < toy_article.txt` ## ref https://github.com/lervag/vimtex/blob/1043b590d98fa3f069a0879c65293aa2c7c31b0d/doc/vimtex.txt#L728 http://dustycloud.org/blog/vcs-friendly-patchable-document-line-wrapping https://github.com/sembr/specification https://github.com/vim-autoformat/vim-autoformat https://github.com/cmhughes/latexindent.pl https://github.com/remarkjs/remark#example-checking-and-formatting-markdown-on-the-cli vim with NLTK: https://github.com/gmarmstrong/vim-muse It's still very experimental, so use it at your own risk. After installing just use `` to format your text. ## Basic NLP knowledge https://spacy.io/api/token class Token : An individual token — i.e. a word, punctuation symbol, whitespace, etc. stop words: “stop signals” for the algorithm to process. e.g.: “a”, “and”, “the” and “of”. ref: https://www.nomidl.com/natural-language-processing/what-is-stop-word-in-nlp