def getCorrectAnswer(self): words = MecabTool.parseToWordsFull(self.currentExample.sentence) answer = self.find(lambda word: self.currentItem.character in word['word'] , words) try: return kata2hira(answer['pronunciation']) except Exception: return u' '
def getWordPronunciationFromExample(self, item): words = MecabTool.parseToWordsFull(self.currentExample.sentence) answer = self.find(lambda word: item in word['word'] , words) try: return kata2hira(answer['pronunciation']) except Exception: return u' '
def getWordPronounciation(self, item): try: return kata2hira(MecabTool.parseToWordsFull(item)[0]['pronunciation']) except: return item
def getWordNonInflectedForm(self, item): try: return MecabTool.parseToWordsFull(item)[0]['nform'] except: return item
def getParsedExampleInFull(self): return MecabTool.parseToWordsFull(self.currentExample.sentence)
def getWordFromExample(self): words = MecabTool.parseToWordsFull(self.currentExample.sentence) answer = self.find(lambda word: self.currentItem.character in word['word'] , words) return answer['word']