srlearn.boostsrl¶

(Deprecated) boostsrl class for training and testing.

Warning

This module is deprecated, pending removal in 0.6.0. See srlearn.rdn instead.

Functions

call_process(call)

Deprecated since version 0.5.0.

example_data(example)

Deprecated since version 0.5.0.

inspect_example_syntax(example)

Deprecated since version 0.5.0.

inspect_mode_syntax(example)

Deprecated since version 0.5.0.

write_to_file(content, path)

Deprecated since version 0.5.0.

Classes

modes(background, target[, bridgers, â€¦])
test(model, test_pos, test_neg, test_facts)

Deprecated since version 0.5.0.

train(background, train_pos, train_neg, â€¦)

Deprecated since version 0.5.0.

srlearn.boostsrl.call_process(call)[source]¶

Deprecated since version 0.5.0: Not intended as a public method.

Create a subprocess and wait for it to finish. Raise an Exception if errors occur.

srlearn.boostsrl.example_data(example)[source]¶

Deprecated since version 0.5.0: Use srlearn.example_data instead.

For demo purposes, include some sample data.

from srlearn.boostsrl import example_data
train_pos = example_data('train_pos')
train_neg = example_data('train_neg')
train_facts = example_data('train_facts')
srlearn.boostsrl.inspect_example_syntax(example)[source]¶

Deprecated since version 0.5.0: Not intended as a public method.

Uses a regular expression to check whether all of the examples in a list are in the correct form.

srlearn.boostsrl.inspect_mode_syntax(example)[source]¶

Deprecated since version 0.5.0: Not intended as a public method.

Uses a regular expression to check whether all of the examples in a list are in the correct form.

class srlearn.boostsrl.test(model, test_pos, test_neg, test_facts, trees=10)[source]¶

Deprecated since version 0.5.0: Use srlearn.rdn instead.

inference_results(target)[source]¶

Converts BoostSRL results into a Python dictionary.

class srlearn.boostsrl.train(background, train_pos, train_neg, train_facts, save=False, advice=False, softm=False, alpha=0.5, beta=-2, trees=10)[source]¶

Deprecated since version 0.5.0: Use srlearn.rdn instead.

traintime() → float[source]¶

Returns a float representing seconds.

tree(treenumber, target, image=False)[source]¶
srlearn.boostsrl.write_to_file(content, path)[source]¶

Deprecated since version 0.5.0: Not intended as a public method.

Takes a list (content) and a path/file (path) and writes each line of the list to the file location.