Ejemplo n.º 1
0
    f.write(printTitle('Explanation'))
    f.write(
        f"You can use the volitional form with {toomotteimasu} to express what the speaker is thinking of doing. Note that when you use this expression, the decision of doing something was made some time ago. You can also use to express a third person's will or intention."
    )

    f.write(printTitle('Examples'))

    f.write('<b>Example A</b>')
    f.write('<br>')
    l1 = TextPair('週末は 海に 行こうと思っています。',
                  "I am thinking of going to the beach at the weekend.", [
                      HighlightText('行こう', Color.LIGHT_GREEN),
                      HighlightText('と 思っています', Color.LIGHT_PINK)
                  ],
                  addBullet=True)
    f.write(generate([l1]))
    writeNewLine(f)

    f.write('<b>Example B</b>')
    f.write('<br>')
    l1 = TextPair('今から 銀行へ 行こうと思っています。',
                  "I'm going to the bank now.", [
                      HighlightText('行こう', Color.LIGHT_GREEN),
                      HighlightText('と 思っています', Color.LIGHT_PINK)
                  ],
                  addBullet=True)
    f.write(generate([l1]))
    writeNewLine(f)

    f.write('<b>Example C</b>')
    f.write('<br>')
Ejemplo n.º 2
0
from python_utils.generator import generate, printBreakLine, generateVocab
from python_utils.model import TextPair, HighlightText, Color

l1 = TextPair('いい 先生を 紹介して いただけませんか。',
              'Would you please introduce a good teacher to me?', [
                  HighlightText('紹介して', Color.LIGHT_GREEN),
                  HighlightText('いただけませんか', Color.LIGHT_PINK)
              ],
              addBullet=True)
print(generate([l1]))
printBreakLine()
l2 = TextPair('写真を 撮って いただけませんか。',
              'Would you please take a picture?', [
                  HighlightText('撮って', Color.LIGHT_GREEN),
                  HighlightText('いただけませんか', Color.LIGHT_PINK)
              ],
              addBullet=True)
print(generate([l2]))

print('###Vocabulary')
print('<ol>')
print(generateVocab('先生 ', 'teacher'))
print(generateVocab('紹介', 'introduction'))
print(generateVocab('写真', 'photo; picture'))
print(generateVocab('撮る', 'to take (a photo)'))
print('</ol>')
Ejemplo n.º 3
0
from python_utils.mermaid_flow_chart_utils import getCssFlowChartWithTwoBlock
from python_utils.model import TextPair, HighlightText, Color
from python_utils.vocab_list import generateVocabLines

with open('conditional_nara_form.md', 'w', encoding="utf-8") as f:
    f.write(printTitle('Conditional - なら 「nara」form'))

    f.write('You can use なら 「nara」based on the situation but it is better to explain with examples. Please look at each example with an explanation.')

    f.write('<br>')
    f.write('<br>')
    f.write('<b>Example A</b>')
    f.write('<br>')
    l1 = TextPair('ブラジルに、行ったことがありますか。', 'Have you even been to Brazil?', addBullet=True, )
    l2 = TextPair('チリなら行ったことが, ブラジルは行ったことがありません。', "I've been to Chile, but never been to Brazil.", [HighlightText('なら', Color.LIGHT_GREEN)])
    f.write(generate([l1, l2]))

    f.write('\n')
    f.write(getInfoBlock("The second speaker responded with a contact sentence to show that even though he/she been to Chile, he/she never been to Brazil. "))
    f.write('\n')

    f.write('<br>')
    f.write('<b>Example B</b>')
    f.write('<br>')
    l1 = TextPair('日本語が、わかりますか。', 'Do you understand Japanese?', addBullet=True, )
    l2 = TextPair('ひらがななら わかります。', "if it is (written) in Hiragana, then yes.", [HighlightText('なら', Color.LIGHT_GREEN)])
    f.write(generate([l1, l2]))

    f.write('\n')
    f.write(getInfoBlock("Here, we want to express the limitation (written language limited to Hiragana in this situation)."))
    f.write('\n')
print('###Case Study')
print(
    '(1) When the speaker gueesses the reason or the cause as to what he has seen or heard an the confirms wherther he is correct.'
)
l1 = TextPair('渡辺さんは-時々-大阪弁を-使いますね。',
              'Ms. Watanabe, you sometimes speak Osaka dialect.', [],
              addBullet=True)
l2 = TextPair('大阪に住んで いたんですか。',
              "Have you lived in Osaka?",
              highlightText=[HighlightText('んですか', Color.LIGHT_PINK)],
              addBreak=True)
l3 = TextPair('...ええ,15 歳まで 大阪に 住んで います。',
              "Yes, I lived in Osaka until I was fifteen.", [],
              forceReplaceList=[ForceReplace('歳', 'さい')])
print(generate([l1, l2, l3]))
printBreakLine()

print(
    '(2) When the speaker asks for the information about what he has been heard.'
)
l1 = TextPair(
    'おもしろい デザインの 靴ですね。どこで-買ったんですか。',
    'The design of your shoes is interesting. Where did you buy them?',
    [HighlightText('んですか', Color.LIGHT_PINK)],
    addBullet=True,
)
l2 = TextPair(
    'イドヤストアで 買いました。',
    '...I bought this pair at Edoya Store.',
)