def get(self): line = self.fp.readline() if line == "": return None line = line.strip() inst = Instance() inst.raw = line return inst
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
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