Module topicnet.viewers.base_viewer
Expand source code
from ..cooking_machine.models.base_model import BaseModel
class BaseViewer:
""" """
def __init__(self, model):
if not isinstance(model, BaseModel):
raise TypeError('Parameter "model" should derive from BaseModel')
self._model = model
@property
def model(self):
""" """
return self._model
def view(self, *args, **kwargs):
"""
Main method of viewer.
Returns
-------
optional
"""
raise NotImplementedError('Should be implemented in subclass')
Classes
class BaseViewer (model)
-
Expand source code
class BaseViewer: """ """ def __init__(self, model): if not isinstance(model, BaseModel): raise TypeError('Parameter "model" should derive from BaseModel') self._model = model @property def model(self): """ """ return self._model def view(self, *args, **kwargs): """ Main method of viewer. Returns ------- optional """ raise NotImplementedError('Should be implemented in subclass')
Subclasses
- DocumentClusterViewer
- TopTopicsFeatures
- TopicSpectrumViewer
- TopDocumentsViewer
- TopSimilarDocumentsViewer
- TopTokensViewer
- TopicFlowViewer
- TopicMapViewer
Instance variables
var model
-
Expand source code
@property def model(self): """ """ return self._model
Methods
def view(self, *args, **kwargs)
-
Main method of viewer.
Returns
optional
Expand source code
def view(self, *args, **kwargs): """ Main method of viewer. Returns ------- optional """ raise NotImplementedError('Should be implemented in subclass')