intent.tests package

Submodules

intent.tests.basic_enrichment_tests module

class intent.tests.basic_enrichment_tests.EncodingTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_encoding()[source]
test_hanging()[source]
class intent.tests.basic_enrichment_tests.L_G_WordAlignTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

align_test()[source]

Confirm that the question mark gets split and is its own token, but also that the lang and gloss lines still align correctly.

setUp()[source]
test_correct_multiple_lang_behavior()[source]
class intent.tests.basic_enrichment_tests.NoLineTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_nogloss()[source]
class intent.tests.basic_enrichment_tests.NoRawTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

clean_test()[source]

The “clean” tier is already defined in this example. Assert that it is simply returned without incident.

gloss_test()[source]

Ensure that the gloss gets created, and that it doesn’t get created twice by accident.

glosses_test()[source]
lang_test()[source]
morph_align_test()[source]
morphs_test()[source]
no_raw_test()[source]

There is no raw tier in this instance, so it should return a failure.

norm_test()[source]

Ensure that the normal tier is created without incident.

setUp()[source]
trans_test()[source]
word_align_test()[source]
class intent.tests.basic_enrichment_tests.NullGlossTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_basic_processing()[source]

intent.tests.id_tests module

class intent.tests.id_tests.IdTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for asserting that the ID generation functions as expected.

standard_id_test()[source]
class intent.tests.id_tests.TierIdTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

same_type_different_tiers_test()[source]
setUp()[source]
unique_tier_test()[source]

intent.tests.meta_tests module

class intent.tests.meta_tests.ContentfulMeta(methodName='runTest')[source]

Bases: unittest.case.TestCase

content_test()[source]
setUp()[source]
class intent.tests.meta_tests.DelMetaTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

meta_remains_test()[source]
no_meta_remains_test()[source]
setUp()[source]
class intent.tests.meta_tests.ProvenanceTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

add_meta_test()[source]
setUp()[source]
timestamp_test()[source]
class intent.tests.meta_tests.WordTypeTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_w_metadata()[source]
test_wo_metadata()[source]

intent.tests.morph_align_tests module

class intent.tests.morph_align_tests.MorphAlignTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

more_morph_align_test()[source]
morph_align_test()[source]
setUp()[source]
test_intervening_characters()[source]
class intent.tests.morph_align_tests.NewMorphAlignTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_line_lengths()[source]
test_word_alignment()[source]

intent.tests.parsetests module

class intent.tests.parsetests.DepTreeTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_814()[source]
class intent.tests.parsetests.MultipleLineTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_911()[source]
class intent.tests.parsetests.ParseTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_ctn()[source]
test_ger()[source]
test_kor()[source]
class intent.tests.parsetests.ReadTreeTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit tests to ensure that trees are read correctly from XIGT.

setUp()[source]
test_conll()[source]
test_ds_cycle()[source]

The tree in the ds_cycle file has “woman” depend both on “arriving” and “browse.”

test_project_ds_tree()[source]

Test that performing projection works correctly.

test_read_ds_tree()[source]
test_read_proj_ds_tree()[source]
class intent.tests.parsetests.UnknownErrorTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

harness(name)[source]
test_3191()[source]
test_3294()[source]
test_3307()[source]
test_ds_project()[source]

intent.tests.spantest module

class intent.tests.spantest.ContainsTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_contains_complex()[source]
test_contains_simple()[source]
class intent.tests.spantest.span_test(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_contains()[source]
test_spans()[source]

intent.tests.treetests module

class intent.tests.treetests.CONLLTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_conll_file()[source]
test_conll_file_stats()[source]
test_conll_read()[source]
test_conll_write()[source]
class intent.tests.treetests.DeleteTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

promote_test()[source]

Ensure that the “promote=” keyword works as expected.

propagate_test()[source]
replace_test()[source]
setUp()[source]
class intent.tests.treetests.DepTreeCycleTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_cycle()[source]
class intent.tests.treetests.DepTreeParseTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

broken_parse_test()[source]
class intent.tests.treetests.DepTreeTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

parse_test()[source]
setUp()[source]
test_copy()[source]
test_equality()[source]
test_find()[source]
test_span()[source]
class intent.tests.treetests.MergeTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

ctn_merge_2_test()[source]
internal_merge_test()[source]
setUp()[source]
test_merge_interior_nodes()[source]
test_merge_preterminal_and_nonterminal_w_unify()[source]
test_merge_preterminal_and_nonterminal_wo_unify()[source]
test_merge_preterminal_nodes_no_unify()[source]
test_merge_preterminal_nodes_unify()[source]
class intent.tests.treetests.ProjectDS(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_projection_1()[source]

Testcase for the DS projection in Fei/Will’s paper.

test_projection_2()[source]
test_projection_3()[source]
test_ptb_ds_string()[source]

Unit test for parsing the PTB-style format.

test_ptb_stanford_equiv()[source]
test_stanford_ds_string()[source]

Unit tests for parsing the stanford dependency format, and ensuring it is written back out correctly.

class intent.tests.treetests.ProjectTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

failed_insertion_test()[source]
ordering_test()[source]

This particular tree structure results in changing a child of a tree while iterating through the children and required a fix such that if such a change is detected, we start iterating over the children again, so we’re not holding onto a stale pointer.

setUp()[source]
test_duplicates()[source]

Test the case where an English word aligns to multiple language words.

test_projection()[source]
class intent.tests.treetests.PromoteTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_equality()[source]
test_promote()[source]
class intent.tests.treetests.SpanTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_span()[source]
class intent.tests.treetests.SwapTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_swap_nonterminals()[source]
test_swap_preterminals()[source]

Module contents