|
| 1 | +import CorpusLoaders |
| 2 | +using ScientificTypes |
| 3 | + |
1 | 4 | @testset "text analysis" begin
|
2 | 5 | tagged_word = CorpusLoaders.PosTaggedWord("NN", "wheelbarrow")
|
3 | 6 | tagged_word2 = CorpusLoaders.PosTaggedWord("NN", "soil")
|
|
6 | 9 | @test scitype(bag_of_words) == Multiset{Textual}
|
7 | 10 | bag_of_tagged_words = Dict(tagged_word => 5)
|
8 | 11 | @test scitype(bag_of_tagged_words) == Multiset{Annotated{Textual}}
|
9 |
| - @test scitype(Document("My Document", "kadsfkj")) == Unknown |
10 |
| - @test scitype(Document([tagged_word, tagged_word2])) == |
| 12 | + @test scitype(CorpusLoaders.Document("My Document", "kadsfkj")) == Unknown |
| 13 | + @test scitype(CorpusLoaders.Document([tagged_word, tagged_word2])) == |
11 | 14 | Annotated{AbstractVector{Annotated{Textual}}}
|
12 |
| - @test scitype(Document("My Other Doc", [tagged_word, tagged_word2])) == |
| 15 | + @test scitype(CorpusLoaders.Document("My Other Doc", |
| 16 | + [tagged_word, tagged_word2])) == |
13 | 17 | Annotated{AbstractVector{Annotated{Textual}}}
|
14 | 18 | nested_tokens = [["dog", "cat"], ["bird", "cat"]]
|
15 |
| - @test scitype(Document("Essay Number 1", nested_tokens)) == |
| 19 | + @test scitype(CorpusLoaders.Document("Essay Number 1", nested_tokens)) == |
16 | 20 | Annotated{AbstractVector{AbstractVector{Textual}}}
|
17 | 21 |
|
18 | 22 | @test scitype(Dict(("cat", "in") => 3)) == Multiset{Tuple{Textual,Textual}}
|
|
0 commit comments