Grammalecte  Check-in [4176701b46]

Overview
Comment:fix server
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | v0.5.16 | server
Files: files | file ages | folders
SHA3-256: 4176701b46b5fa96766585997236c89c363de6877de640543e5a200ee063ac4f
User & Date: olr on 2017-04-26 17:14:08
Other Links: manifest | tags
Context
2017-04-27
07:00
[fr] version minimale pour Firefox check-in: 5c8705d0d9 user: olr tags: trunk, fr
2017-04-26
17:14
fix server check-in: 4176701b46 user: olr tags: trunk, v0.5.16, server
15:21
[fr] ajustements sur about_panel check-in: 71bdd94ca9 user: olr tags: trunk, fr
Changes

Modified server.py from [23ea490c32] to [f2aebf4d47].

127
128
129
130
131
132
133

134
135
136
137
138
139
140
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141







+







    while True:
        yield str(i)
        i += 1


def parseParagraph (iParagraph, sText, oTokenizer, oDict, dOptions, bDebug=False, bEmptyIfNoErrors=False):
    aGrammErrs = gce.parse(sText, "FR", bDebug, dOptions)
    aGrammErrs = list(aGrammErrs)
    aSpellErrs = []
    for dToken in oTokenizer.genTokens(sText):
        if dToken['sType'] == "WORD" and not oDict.isValidToken(dToken['sValue']):
            aSpellErrs.append(dToken)
    if bEmptyIfNoErrors and not aGrammErrs and not aSpellErrs:
        return ""
    return "  " + json.dumps({ "iParagraph": iParagraph, "lGrammarErrors": aGrammErrs, "lSpellingErrors": aSpellErrs }, ensure_ascii=False)