Did I find the right examples for you? yes no

All Samples(6)  |  Call(0)  |  Derive(0)  |  Import(6)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/m/b/MBSP-HEAD/mbsp.py   MBSP(Download)
import prepositions
 
from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
from config import SLASH
 
    format = [WORD]
    if tags      : format.append(POS)
    if chunks    : format.extend((CHUNK, PNP))
    if relations : format.append(REL)
    if anchors   : format.append(ANCHOR)
    # Find PNP chunks.
    if chunks or relations or anchors:
        f = [WORD, POS, CHUNK, PNP]
        s = _find_prepositions(s)
        s = _handle_event("on_parse_prepositions", s, format=f)
    # Find relations.
    if relations:
        f = [WORD, POS, CHUNK, PNP, REL]
    # Find lemmata.
    if lemmata or anchors:
        f = [WORD, POS, CHUNK, PNP] + (relations and [REL] or []) + [LEMMA]
        s = _lemmatize_merge(s, _lemmatize(_lemmatize_prepare(s)))
        s = _handle_event("on_lemmatize", s, format=f)

src/m/b/MBSP-HEAD/tree.py   MBSP(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True
except:
            elif tag == CHUNK and ch and ch.type:
                tags[i] = (self == ch[0] and B or I) + ch.type
            elif tag == PNP and self.pnp:
                tags[i] = (self == self.pnp[0] and B or I) + "PNP"
            elif tag == REL and ch and len(ch.relations) > 0:
               IOB: None,
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
        # Return the tags in the same order as the parameters for Sentence.append().
        custom = dict([(tag, p[tag]) for tag in custom])
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == CHUNK:
            return self.words[index].chunk
        if tag == PNP:
            return self.words[index].pnp
        if tag == REL:

src/p/a/pattern-2.6/pattern/text/tree.py   Pattern(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True # Memory-Based Shallow Parser for Python.
except:
            elif tag == CHUNK and ch and ch.type:
                tags[i] = (self == ch[0] and B or I) + ch.type
            elif tag == PNP and self.pnp:
                tags[i] = (self == self.pnp[0] and B or I) + "PNP"
            elif tag == REL and ch and len(ch.relations) > 0:
               IOB: None,
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
        self._previous = p
        # Return the tags in the right order for Sentence.append().
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == CHUNK:
            return self.words[index].chunk
        if tag == PNP:
            return self.words[index].pnp
        if tag == REL:

src/p/a/pattern-HEAD/pattern/text/tree.py   pattern(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True # Memory-Based Shallow Parser for Python.
except:
            elif tag == CHUNK and ch and ch.type:
                tags[i] = (self == ch[0] and B or I) + ch.type
            elif tag == PNP and self.pnp:
                tags[i] = (self == self.pnp[0] and B or I) + "PNP"
            elif tag == REL and ch and len(ch.relations) > 0:
               IOB: None,
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
        self._previous = p
        # Return the tags in the right order for Sentence.append().
        return p[WORD], p[LEMMA], p[POS], p[CHUNK], p[ROLE], p[REL], p[PNP], p[ANCHOR], p[IOB], custom
 
    def _parse_relation(self, tag):
        if tag == CHUNK:
            return self.words[index].chunk
        if tag == PNP:
            return self.words[index].pnp
        if tag == REL:

src/m/b/MBSP-HEAD/prepositions/classify.py   MBSP(Download)
    # We will end up here if mbsp.py is called directly from the command line
    import config
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    from client import batch, TimblPP
    from tree   import Sentence
            if chunk.start not in pnp.range:
                if chunk.type == 'NP':
                    pp = sentence.get(chunk.start, PNP)
                    if pp is None:
                        instances.append(_PP_instance(sentence, pnp, chunk))

src/m/b/MBSP-HEAD/prepositions/rules.py   MBSP(Download)
except ImportError:
    # We will end up here if mbsp.py is called directly from the command line
    from config import CHUNK, PNP
 
def apply(attachments, sentence):