def helper_parse(examples): model = Workspace(quiet=True, cb_adf=True) ex = model.parse(examples) assert len(ex) == 2 model.learn(ex) model.finish_example(ex) model.finish()
def test_parse_2(): model = Workspace(quiet=True, cb_adf=True) ex = model.parse("| a:1 b:0.5\n0:0.1:0.75 | a:0.5 b:1 c:2") assert len(ex) == 2 model.learn(ex) model.finish_example(ex) model.finish() model = Workspace(quiet=True, cb_adf=True) ex = model.parse(["| a:1 b:0.5", "0:0.1:0.75 | a:0.5 b:1 c:2"]) assert len(ex) == 2 model.learn(ex) model.finish_example(ex) model.finish()