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

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

src/c/o/conceptnet-HEAD/conceptnet/corpus/parse/run_parser.py   conceptnet(Download)
 
    if reltext is None or reltext == 'junk': return []
    relation = Relation.objects.get(name=reltext)
    text_factors = [lang.nl.lemma_factor(matches[i]) for i in (1, 2)]
    concepts = [Concept.objects.get_or_create(language=lang, text=stem)[0]
 
    if reltext is None or reltext == 'junk': return []
    relation = Relation.objects.get(name=reltext)
    text_factors = [lang.nl.lemma_factor(matches[i]) for i in (1, 2)]
    concepts = [Concept.objects.get_or_create(language=lang, text=stem)[0]

src/c/o/conceptnet-HEAD/conceptnet/webapi/handlers.py   conceptnet(Download)
    def read(self, request, lang, dir, relation, concept, limit=20):
        limit = int(limit)
        if limit > 100: limit=20
        try:
            relation = Relation.objects.get(name=relation)
    def read(self, request, lang, relation, text1, text2):
        try:
            concept1 = concept_lookup(text1, lang)
            concept2 = concept_lookup(text2, lang)
            relation = Relation.objects.get(name=relation)