Rev 146 | Rev 158 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
146 | szabot | 1 | import parse |
151 | szabot | 2 | import dbconnector |
146 | szabot | 3 | def translatesent(sent, lang): |
4 | sent = parse.parsesent(sent) |
||
5 | for word in sent: |
||
6 | if word["word"]["id"] != 0: |
||
7 | word["translated"] = dbconnector.translate(word["word"]["id"],lang) |
||
8 | else: |
||
9 | word["translated"] = word["word"]["navi"] |
||
10 | return sent |