Overview
Comment: | [graphspell] deprecated code |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
c915d50f4a27d7f9a93029b73584b1c6 |
User & Date: | olr on 2018-01-02 10:30:48 |
Other Links: | manifest | tags |
Context
2018-01-03
| ||
15:47 | [build] fix build check-in: ba196f2521 user: olr tags: trunk, build | |
2018-01-02
| ||
10:30 | [graphspell] deprecated code check-in: c915d50f4a user: olr tags: trunk, graphspell | |
2017-12-31
| ||
13:24 | [fr] màj: impératif check-in: d1c4b065e9 user: olr tags: trunk, fr | |
Changes
Modified graphspell/dawg.py from [eb4c8506bd] to [1a8e51e627].
︙ | ︙ | |||
25 26 27 28 29 30 31 | for sLine in hSrc: sLine = sLine.strip() if sLine and not sLine.startswith("#"): yield sLine else: raise OSError("# Error. File not found or not loadable: " + spf) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | for sLine in hSrc: sLine = sLine.strip() if sLine and not sLine.startswith("#"): yield sLine else: raise OSError("# Error. File not found or not loadable: " + spf) class DAWG: """DIRECT ACYCLIC WORD GRAPH""" # This code is inspired from Steve Hanov’s DAWG, 2011. (http://stevehanov.ca/blog/index.php?id=115) # We store suffix/affix codes and tags within the graph after the “real” word. # A word is a list of numbers [ c1, c2, c3 . . . cN, iAffix, iTags] |
︙ | ︙ | |||
101 102 103 104 105 106 107 | lEntry = [] lChar = ['']; dChar = {}; nChar = 1; dCharOccur = {} lAff = []; dAff = {}; nAff = 0; dAffOccur = {} lTag = []; dTag = {}; nTag = 0; dTagOccur = {} nErr = 0 # read lexicon | > | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | lEntry = [] lChar = ['']; dChar = {}; nChar = 1; dCharOccur = {} lAff = []; dAff = {}; nAff = 0; dAffOccur = {} lTag = []; dTag = {}; nTag = 0; dTagOccur = {} nErr = 0 # read lexicon for sLine in readFile(spfSrc): sFlex, sStem, sTag = sLine.split("\t") addWordToCharDict(sFlex) # chars for c in sFlex: if c not in dChar: dChar[c] = nChar lChar.append(c) nChar += 1 |
︙ | ︙ |