1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-14 04:32:29 +00:00

Change name to split, according to issue #37

This commit is contained in:
militarpancho 2017-06-13 19:44:40 +02:00
parent f8ca595bc9
commit 83e2d415a1
2 changed files with 5 additions and 5 deletions

View File

@ -3,12 +3,12 @@ from senpy.models import Entry
from nltk.tokenize.punkt import PunktSentenceTokenizer
from nltk.tokenize.simple import LineTokenizer
import nltk
class ChunkerPlugin(AnalysisPlugin):
class SplitPlugin(AnalysisPlugin):
def activate(self):
nltk.download('punkt')
def analyse_entry(self, entry, params):
chunker_type = params.get("type", "sentence")
chunker_type = params.get("delimiter", "sentence")
original_id = entry.id
original_text = entry.get("text", None)
if chunker_type == "sentence":

View File

@ -1,13 +1,13 @@
---
name: chunker
module: chunker
name: split
module: split
description: A sample plugin that chunks input text
author: "@militarpancho"
version: '0.1'
url: "https://github.com/gsi-upm/senpy"
requirements: {nltk}
extra_params:
type:
delimiter:
aliases:
- type
- t