Overview
Comment: | [cli] update doc |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | cli |
Files: | files | file ages | folders |
SHA3-256: |
60164f94724e1d99bfe0b14043f22770 |
User & Date: | olr on 2019-05-25 10:22:48 |
Other Links: | manifest | tags |
Context
2019-05-25
| ||
12:00 | [cli] update doc check-in: aab70a48af user: olr tags: trunk, cli | |
10:22 | [cli] update doc check-in: 60164f9472 user: olr tags: trunk, cli | |
10:20 | [cli] new command: @@ for full analysis check-in: 4e38c87cf8 user: olr tags: trunk, cli | |
Changes
Modified grammalecte-cli.py from [03fd556d3c] to [87a8844802].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | _HELP = """ /help /h show this text ?word1 [word2] ... words analysis !word suggestion >word draw path of word in the word graph =filter show all entries whose morphology fits to filter /lopt /lo list options /lrules [pattern] /lr list rules /o+ option1 [option2] ... activate grammar checking options /o- option1 [option2] ... deactivate grammar checking options /r+ rule1 [rule2] ... reactivate grammar checking rule /r- rule1 [rule2] ... deactivate grammar checking rule /textformatter /tf switch on/off the text formatter | > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | _HELP = """ /help /h show this text ?word1 [word2] ... words analysis !word suggestion >word draw path of word in the word graph =filter show all entries whose morphology fits to filter @@text show sentences and tokens of text /lopt /lo list options /lrules [pattern] /lr list rules /o+ option1 [option2] ... activate grammar checking options /o- option1 [option2] ... deactivate grammar checking options /r+ rule1 [rule2] ... reactivate grammar checking rule /r- rule1 [rule2] ... deactivate grammar checking rule /textformatter /tf switch on/off the text formatter |
︙ | ︙ | |||
258 259 260 261 262 263 264 265 266 | elif sText in ("/quit", "/q"): break elif sText.startswith("/rl"): # reload (todo) pass elif sText.startswith("@@"): for sParagraph in txt.getParagraph(sText): if xArgs.textformatter: sText = oTextFormatter.formatText(sParagraph) | > | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | elif sText in ("/quit", "/q"): break elif sText.startswith("/rl"): # reload (todo) pass elif sText.startswith("@@"): for sParagraph in txt.getParagraph(sText): sText = sText[2:] if xArgs.textformatter: sText = oTextFormatter.formatText(sParagraph) for dSentence in oGrammarChecker.gce.parse(sText, bDebug=xArgs.debug, bFullInfo=True): echo("{nStart}:{nEnd}".format(**dSentence)) echo(" <" + dSentence["sSentence"]+">") for dToken in dSentence["lToken"]: print(" {0[nStart]:>3}:{0[nEnd]:<3} {1} {0[sType]:<14} {0[sValue]:<16} {2:<10} {3}".format(dToken, \ "×" if dToken.get("bToRemove", False) else " ", " ".join(dToken.get("lMorph", "")), \ "·".join(dToken.get("aTags", "")) ) ) |
︙ | ︙ |