Rev 158 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
146 | szabot | 1 | import parse |
2 | |||
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 |