Did I find the right examples for you? yes no

All Samples(5)  |  Call(0)  |  Derive(0)  |  Import(5)
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/tree.py   MBSP(Download)
try:
    from config import SLASH
    from config import WORD, POS, CHUNK, PNP, REL, ANCHOR, LEMMA
    MBSP = True
except:
            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:
                tags[i] = ["-".join([str(x) for x in [ch.type]+list(reversed(r)) if x]) for r in ch.relations]
                tags[i] = "*".join(tags[i])
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
            ANCHOR: None,
        # NP-SBJ-1 => relation id is 1 and role SBJ, VP-1 => relation id is 1 and no role.
        # Note: tokens can be tagged with multiple relations (e.g. NP-OBJ-1*NP-OBJ-3).
        if p[REL] is not None:
            ch, p[REL], p[ROLE] = self._parse_relation(p[REL])
            # We can derive a (missing) chunk tag from the relation tag (e.g. NP-SBJ-1 => NP).

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 == 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:
                tags[i] = ["-".join([str(x) for x in [ch.type]+list(reversed(r)) if x]) for r in ch.relations]
                tags[i] = "*".join(tags[i])
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
            ANCHOR: None,
        # VP-1 => relation id is 1 with no role.
        # Tokens may be tagged with multiple relations (e.g., NP-OBJ-1*NP-OBJ-3).
        if p[REL] is not None:
            ch, p[REL], p[ROLE] = self._parse_relation(p[REL])
            # Infer a missing chunk tag from the relation tag (e.g., NP-SBJ-1 => NP).

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 == 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:
                tags[i] = ["-".join([str(x) for x in [ch.type]+list(reversed(r)) if x]) for r in ch.relations]
                tags[i] = "*".join(tags[i])
             CHUNK: None,
               PNP: None,
               REL: None,
              ROLE: None,
            ANCHOR: None,
        # VP-1 => relation id is 1 with no role.
        # Tokens may be tagged with multiple relations (e.g., NP-OBJ-1*NP-OBJ-3).
        if p[REL] is not None:
            ch, p[REL], p[ROLE] = self._parse_relation(p[REL])
            # Infer a missing chunk tag from the relation tag (e.g., NP-SBJ-1 => NP).

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
 
    if tags      : format.append(POS)
    if chunks    : format.extend((CHUNK, PNP))
    if relations : format.append(REL)
    if anchors   : format.append(ANCHOR)
    if lemmata   : format.append(LEMMA)
    # Find relations.
    if relations:
        f = [WORD, POS, CHUNK, PNP, REL]
        s = _find_relations(s)
        s = _handle_event("on_parse_relations", s, format=f)
    # Find lemmata.
    if lemmata or anchors:
        f = [WORD, POS, CHUNK, PNP] + (relations and [REL] or []) + [LEMMA]
    # Find PP anchors.
    if anchors:
        f = [WORD, POS, CHUNK, PNP] + (relations and [REL] or []) + [LEMMA, ANCHOR]
        s = _find_pp_attachments(s, format=f)
        s = _handle_event("on_parse_pp_attachments", s, format=f)

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