Index: grammalecte-cli.py ================================================================== --- grammalecte-cli.py +++ grammalecte-cli.py @@ -22,10 +22,11 @@ /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 @@ -260,13 +261,14 @@ 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[2:], bDebug=xArgs.debug, bFullInfo=True): + 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 " ",