Пример #1
0
    def get(self):
        line = self.fp.readline()
        if line == "":
            return None
        line = line.strip()
        inst = Instance()
        inst.raw = line

        return inst
Пример #2
0
    def get(self):
        line = self.fp.readline()

        if line == "":
            return None

        line = line.strip()

        inst = Instance()
        inst.forms = line.split()
        inst.raw   = "".join(inst.forms)

        return inst
Пример #3
0
    def get(self):
        line = self.fp.readline()

        if line == "":
            return None

        line = line.strip()

        inst = Instance()
        inst.forms   = [word.rsplit("_")[0] for word in line.split()]
        inst.postags = [word.rsplit("_")[1] for word in line.split()]
        inst.raw     = "".join(inst.forms)

        return inst