Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def split_uri(uri):
    """
    Get the slash-delimited pieces of a URI.
        
    >>> split_uri('/c/en/cat/n/feline')
    ['c', 'en', 'cat', 'n', 'feline']
    >>> split_uri('/')
    []
    """
    uri2 = uri.lstrip('/')
    if not uri2:
        return []
    return uri2.split('/')
        


src/c/o/ConceptNet-5.2.2/conceptnet5/nodes.py   ConceptNet(Download)
 
from metanl.nltk_morphy import normalize as normalize_english
from conceptnet5.uri import normalize_text, concept_uri, split_uri, BAD_NAMES_FOR_THINGS
 
 
    ['township', 'unite', 'state']
    """
    uri_pieces = split_uri(uri)
    lemmas = uri_pieces[2].split('_')
    if len(uri_pieces) >= 5:

src/c/o/conceptnet5-HEAD/conceptnet5/nodes.py   conceptnet5(Download)
 
from metanl.nltk_morphy import normalize as normalize_english
from conceptnet5.uri import normalize_text, concept_uri, split_uri, BAD_NAMES_FOR_THINGS
 
 
    ['township', 'unite', 'state']
    """
    uri_pieces = split_uri(uri)
    lemmas = uri_pieces[2].split('_')
    if len(uri_pieces) >= 5: