New API¶
- class pyborg.pyborg.PyborgExperimental(brain: pathlib.Path, words: Dict[str, Dict[str, int]], lines: Dict[int, Tuple[str, int]], settings_file: pathlib.Path = PosixPath('/home/docs/.config/pyborg/pyborg.toml'), settings: pyborg.pyborg.FakeCfg2 = FakeCfg2(aliases={}, num_aliases=0, ignore_list=[], max_words=6000, num_words=0, num_contexts=0, no_save=False, learning=True), internal_commands: Dict[str, pyborg.pyborg.InternalCommand] = {'checkdict': InternalCommand(name='checkdict', function=<function checkdict>, help='check the brain for broken links (legacy)', input=False), 'known': InternalCommand(name='known', function=<function known_command>, help=True, input=True)}, ver_string: str = 'I am a version 2.1.0a1 Pyborg', saves_version: str = '1.4.0', ready: bool = False)[source]¶
- classmethod from_brain(brain: pathlib.Path) pyborg.pyborg.PyborgExperimental [source]¶
Old API¶
The core of pyborg is contained in the pyborg.pyborg
module.
- class pyborg.pyborg.pyborg(brain: Optional[Union[str, pathlib.Path]] = None)[source]¶
- learn(body: str, num_context: int = 1) None [source]¶
Lines should be cleaned (filter_message()) before passing to this.