nail_agent/agent/entity_detector.py

16 строки
404 B
Python
Исходник Обычный вид История

2018-11-06 06:04:54 +03:00
from abc import ABC, abstractmethod
class EntityDetector(ABC):
"""
Detect and extract entities from text.
"""
def __init__(self):
self.disallowed = ['i', 'you', 'it', 'north', 'south', 'east', 'west',
'northeast', 'northwest', 'southeast', 'southwest']
@abstractmethod
def detect(self, observation_text):
raise NotImplementedError()