Ejemplo n.º 1
0
def test_parsing_inline_docs():
    from sasctl.services import cas_management as cm

    caslib = cm.get_caslib('Public')
    input = [
        'Halt! Who goes there?',
        ' It is I, Arthur, son of Uther Pendragon, from the castle of '
        'Camelot. King of the Britons, defeater of the Saxons, Sovereign of all England!',
        'Pull the other one!',
        ' I am, and this is my trusty servant Patsy. We have ridden the '
        'length and breadth of the land in search of knights who will join me in my court at Camelot. I must speak with your lord and master.',
        'What? Ridden on a horse?'
    ]

    job = tp.parse_documents(input, caslib=caslib, min_doc_count=1)

    assert_job_succeeds(job)
Ejemplo n.º 2
0
def test_from_inline_docs():
    from sasctl.services import cas_management as cm

    caslib = cm.get_caslib('Public')
    input = [
        "Oh yes, the, uh, the Norwegian Blue. What's wrong with it?",
        "I'll tell you what's wrong with it, my lad. He's dead, that's "
        "what's wrong with it!", "No, no, he's uh,...he's resting.",
        "Look, matey, I know a dead parrot when I see one, and I'm looking "
        "at one right now.",
        "No no he's not dead, he's, he's resting! Remarkable bird, "
        "the Norwegian Blue, isn't it? Beautiful plumage!",
        "The plumage don't enter into it. It's stone dead."
    ]

    job = cp.assign_concepts(input, caslib=caslib)

    assert_job_succeeds(job)
def test_get_caslib():
    target = 'Public'
    caslib = cm.get_caslib(target)

    assert target == caslib.name