Overview
Comment: | [core] str_transform: change functions names |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | core |
Files: | files | file ages | folders |
SHA3-256: |
766f20e23c4c92bb43d777545a474447 |
User & Date: | olr on 2017-06-23 17:25:20 |
Other Links: | manifest | tags |
Context
2017-06-23
| ||
19:23 | [build] use one dictionary name instead of two check-in: cfc69abb68 user: olr tags: trunk, build | |
17:25 | [core] str_transform: change functions names check-in: 766f20e23c user: olr tags: trunk, core | |
17:11 | [core] dawg: compressed lexicon check-in: e5f3698eb4 user: olr tags: trunk, build, new_feature | |
Changes
Modified gc_core/py/dawg.py from [7e6ed7295c] to [ddd6fe1cc6].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | import collections from . import str_transform as st from .progressbar import ProgressBar def readFile (spf): |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | continue sFlex, sStem = sLine.split("\t") else: sFlex = sStem = sLine #print(sFlex, sStem, sTag) yield (sFlex, sStem, sTag) if sTag2: |
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + - + | self.nChar = len(dChar) self.nAff = nAff self.lArcVal = lVal self.nArcVal = len(lVal) self.nTag = self.nArcVal - self.nChar - nAff self.cStemming = cStemming if cStemming == "A": |
︙ |
Modified gc_core/py/ibdawg.py from [9ce1ce821d] to [095d971150].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - + | self.nBytesNodeAddress = int(l[3]) self.nEntries = int(l[4]) self.nNode = int(l[5]) self.nArc = int(l[6]) self.nAff = int(l[7]) self.cStemming = l[8] if self.cStemming == "S": |
︙ |
Modified gc_core/py/str_transform.py from [e86906e5ce] to [7df400eceb].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + - - + + | jSfx = 0 for i in range(min(len(sFlex), len(sStem))): if sFlex[i] != sStem[i]: break jSfx += 1 return chr(len(sFlex)-jSfx+48) + sStem[jSfx:] |
︙ | |||
120 121 122 123 124 125 126 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + - - + + | if M[x][y] > longest: longest = M[x][y] x_longest = x else: M[x][y] = 0 return s1[x_longest-longest : x_longest] |