How to use the nltools.misc.edit_popup function in nltools

To help you get started, we’ve selected a few nltools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gooofy / zamia-speech / speech_lex_edit.py View on Github external
# edit token
        elif c == ord('t'):

            token = misc.edit_popup(stdscr, ' Token ', '')

            lex_set_token (token)

        # edit XS
        elif c == ord('e'):
    
            ipas = lex_entry['ipa']

            xs = ipa2xsampa (lex_token, ipas, stress_to_vowels=False)

            xs = misc.edit_popup(stdscr, ' X-SAMPA ', xs)

            try:
                ipas = xsampa2ipa (lex_token, xs)
    
                lex_entry['ipa'] = ipas

            except:
                pass

                

    #
    # fini
    #

    curses.nocbreak(); stdscr.keypad(0); curses.echo()
github gooofy / zamia-ai / ai_dbg.py View on Github external
def do_edit_prompt():

    global stdcr, prompt

    prompt = misc.edit_popup(stdscr, ' Prompt ', prompt)

    do_process_input()
github gooofy / zamia-ai / ai_trainer.py View on Github external
def do_change_module():

    global stdcr, match_module

    match_module = misc.edit_popup(stdscr, ' Module ', match_module)
github gooofy / zamia-ai / ai_dbg.py View on Github external
def do_change_module():

    global stdcr, match_module

    match_module = misc.edit_popup(stdscr, ' Module ', match_module)
github gooofy / zamia-ai / ai_trainer.py View on Github external
def do_edit_prompt():

    global stdcr, prompt

    prompt = misc.edit_popup(stdscr, ' Prompt ', prompt)

    do_process_input()
github gooofy / zamia-speech / speech_lex_edit.py View on Github external
tts.engine ='mary'
            tts.voice  ='upmc-pierre-hsmm'

            say_ipa('fr', 'mary', 'upmc-pierre-hsmm', ipas)
   
        # speak en mary hsmm
        elif c == ord('u'):
    
            ipas = lex_entry['ipa']

            say_ipa('en-US', 'mary', 'cmu-rms-hsmm', ipas)
   
        # edit token
        elif c == ord('t'):

            token = misc.edit_popup(stdscr, ' Token ', '')

            lex_set_token (token)

        # edit XS
        elif c == ord('e'):
    
            ipas = lex_entry['ipa']

            xs = ipa2xsampa (lex_token, ipas, stress_to_vowels=False)

            xs = misc.edit_popup(stdscr, ' X-SAMPA ', xs)

            try:
                ipas = xsampa2ipa (lex_token, xs)
    
                lex_entry['ipa'] = ipas