claf.machine package

Submodules

class claf.machine.base.Machine(config)[source]

Bases: object

Machine: Combine modules then make a NLP Machine

  • Args:

    config: machine_config

load()[source]
classmethod load_from_config(config_path)[source]
make_module(config)[source]

Make component or experiment for claf Machine’s module

  • Args:
    • config: module’s config (claf.config.namespace.NestedNamespace)

class claf.machine.module.Module[source]

Bases: object

Machine Flag class

COMPONENT = 'component'
EXPERIMENT = 'experiment'
KNOWLEDGE_BASE = 'knowledge_base'
class claf.machine.nlu.NLU(config)[source]

Bases: claf.machine.base.Machine

Natural Language Understanding Machine

  • Args:

    config: machine_config

intent_classification(utterance)[source]
load()[source]
slot_filling(utterance)[source]
class claf.machine.open_qa.OpenQA(config)[source]

Bases: claf.machine.base.Machine

Open-Domain Question Answer Machine (DrQA)

DrQA is a system for reading comprehension applied to open-domain question answering.

  • Args:

    config: machine_config

load()[source]
machine_reading(context, question)[source]
search_documents(question)[source]

Module contents

class claf.machine.OpenQA(config)[source]

Bases: claf.machine.base.Machine

Open-Domain Question Answer Machine (DrQA)

DrQA is a system for reading comprehension applied to open-domain question answering.

  • Args:

    config: machine_config

load()[source]
machine_reading(context, question)[source]
search_documents(question)[source]
class claf.machine.NLU(config)[source]

Bases: claf.machine.base.Machine

Natural Language Understanding Machine

  • Args:

    config: machine_config

intent_classification(utterance)[source]
load()[source]
slot_filling(utterance)[source]