>>> lst = [['M', 'O', 'R', 'S', 'E'], ['C', 'O', 'D', 'E']]
    >>> _spoken_representation_L2(lst)
    '-- --- .-. ... . (space) -.-. --- -.. .'
767245
def _spoken_representation_L2(lst_lst_char):
    
    s = ''
    inter_char = ' '
    inter_word = ' (space) '
    for i, word in enumerate(lst_lst_char):
        if i >= 1:
            s += inter_word
        for j, c in enumerate(word):
            if j != 0:
                s += inter_char
            s += mtalk.encoding.morsetab[c]
    return s
155385
def to_list(self):
        
        return [self.i, self.Ω, self.e, self.ω, self.M, self.n]
1120683
def pretty_print_list(lst, name = 'features', repr_format=True):
    
    if not lst or len(lst) < 8:
        if repr_format:
            return lst.__repr__()
        else:
            return ', '.join(map(str, lst))
    else:
        topk = ', '.join(map(str, lst[:3]))
        if repr_format:
            lst_separator = "["
            lst_end_separator = "]"
        else:
            lst_separator = ""
            lst_end_separator = ""

        return "{start}{topk}, ... {last}{end} (total {size} {name})".format(\
                topk = topk, last = lst[-1], name = name, size = len(lst),
                start = lst_separator, end = lst_end_separator)
584405
private List<List<Term>> seg2sentence(String text) {
        List<String> sentenceList = toSentenceList(text);
        List<List<Term>> resultList = new ArrayList<List<Term>>(sentenceList.size());
        for (String sentence : sentenceList) {
            resultList.add(analysis.parseStr(sentence).recognition(sr).getTerms());
        }
        return resultList;
    }
1144821
def case_sensitive(self, lst):
        
        dictionary = {}
        for pkg in lst:
            dictionary[pkg.lower()] = pkg
        return dictionary
1099356
def list2str(self, l: List, joiner: str) -> str:
        
        result = str()
        for item in l:
            if isinstance(item, list):
                result = result + self.list2str(item, joiner) + joiner
            elif isinstance(item, dict):
                result = result + self.dict2str(item, joiner) + joiner
            elif item:
                result = result + str(item) + joiner
        return result
1239926
def p_list0(p):
    ''''''
    parts = p[1]
    if len(parts) > 1 or p.slice[2].ttype != tokenizer.tokentype.NEWLINE:
        parts.append(ast.node(kind='operator', op=p[2], pos=p.lexspan(2)))
        p[0] = ast.node(kind='list', parts=parts, pos=_partsspan(parts))
    else:
        p[0] = parts[0]
694407
def _return_comma_list(self, l):
        
        if isinstance(l, (text_type, int)):
            return l

        if not isinstance(l, list):
            raise TypeError(l, ' should be a list of integers, \
not {0}'.format(type(l)))

        str_ids = ','.join(str(i) for i in l)

        return str_ids
367582
def string_list_to_array(l):
    
    result = javabridge.get_env().make_object_array(len(l), javabridge.get_env().find_class("java/lang/String"))
    for i in range(len(l)):
        javabridge.get_env().set_object_array_element(result, i, javabridge.get_env().new_string_utf(l[i]))
    return result
13066
def split_list_by(lst, key):
  

  first, second = [], []
  for item in lst:
    if key(item):
      second.append(item)
    else:
      first.append(item)
  return (first, second)
255994
def p_lconst_list(self, p):
        ''''''
        if len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
1113151
def list2html(lst):
    
    txt = '<TABLE width=100% border=0>'
    for l in lst:
        txt += '<TR>\n'
        if type(l) is str:
            txt+= '<TD>' + l + '</TD>\n'
        elif type(l) is list:
            txt+= '<TD>'
            for i in l:
                txt += i + ', '
            txt+= '</TD>'
        else:
            txt+= '<TD>' + str(l) + '</TD>\n'
        txt += '</TR>\n'
    txt += '</TABLE><BR>\n'
    return txt
367410
def build_data_list(lst):
    
    txt = '<H3>' + List + '<H3><UL>'
    for i in lst:
        txt += '<LI>' + i + '</LI>'
        
    txt += '<UL>'
    return txt
276558
def list_str_summarized(list_, list_name, maxlen=5):
    
    if len(list_) > maxlen:
        return 'len(%s)=%d' % (list_name, len(list_))
    else:
        return '%s=%r' % (list_name, list_)
788030
def iter_alignments(dataset, cognate_sets, column='Segments', method='library'):
    
    if not isinstance(dataset, lingpy.basic.parser.QLCParser):
        wordlist = _cldf2wordlist(dataset)
        cognates = {r['Form_ID']: r for r in cognate_sets}
        wordlist.add_entries(
            'cogid',
            'lid',
            lambda x: cognates[x]['Cognateset_ID'] if x in cognates else 0)
        alm = lingpy.Alignments(
            wordlist,
            ref='cogid',
            row='parameter_id',
            col='language_id',
            segments=column.lower())
        alm.align(method=method)
        for k in alm:
            if alm[k, 'lid'] in cognates:
                cognate = cognates[alm[k, 'lid']]
                cognate['Alignment'] = alm[k, 'alignment']
                cognate['Alignment_Method'] = method
    else:
        alm = lingpy.Alignments(dataset, ref='cogid')
        alm.align(method=method)

        for cognate in cognate_sets:
            idx = cognate['ID'] or cognate['Form_ID']
            cognate['Alignment'] = alm[int(idx), 'alignment']
            cognate['Alignment_Method'] = 'SCA-' + method
958188
def list():
    
    choice_len = max(map(len, _input_choices.keys()))
    tmpl = "  {:<%d}: {}\n" % choice_len
    text = ''.join(map(
        lambda k_v: tmpl.format(k_v[0], k_v[1][0]), six.iteritems(_input_choices)))
    click.echo(text)
1130707
def adjoin(space: int, *lists: Sequence[str]) -> str:
    """"""
    lengths = [max(map(len, x)) + space for x in lists[:-1]]

    # not the last one
    lengths.append(max(map(len, lists[-1])))
    max_len = max(map(len, lists))
    chains = (
        itertools.chain(
            (x.ljust(length) for x in lst),
            itertools.repeat(' ' * length, max_len - len(lst)),
        )
        for lst, length in zip(lists, lengths)
    )
    return '\n'.join(map(''.join, zip(*chains)))