for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""Dummy backend for testing basic interaction of projects and backends"""
from annif.hit import AnalysisHit
from . import backend
class DummyBackend(backend.AnnifBackend):
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
__class__
name = "dummy"
def _analyze(self, text, params):
score = float(params.get('score', 1.0))
return [AnalysisHit('http://example.org/dummy', 'dummy', score)]
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.