JuliaAI / ScientificTypes.jl

An API for dispatching on the "scientific" type of data instead of the machine type
MIT License
96 stars 8 forks source link

Fix scitype for multisets of tuples of strings (and tagged strings) #158

Closed ablaom closed 2 years ago

ablaom commented 2 years ago

This used to return Unknown:


julia> bag_of_ngrams =
Dict(
  ("cat",)       => 1,
  ("cat", "in")  => 1,
  ("in",)        => 1,
  ("the", "hat") => 1,
  ("the",)       => 2,
  ("hat",)       => 1,
  ("in", "the")  => 1,
  ("the", "cat") => 1)

julia> scitype(bag_of_ngrams)
Multiset{Tuple{Vararg{Textual, var"#s13"}} where var"#s13"}
codecov-commenter commented 2 years ago

Codecov Report

Merging #158 (d2ff22e) into dev (8bb610c) will decrease coverage by 1.50%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #158      +/-   ##
==========================================
- Coverage   92.02%   90.52%   -1.51%     
==========================================
  Files           7        7              
  Lines         301      306       +5     
==========================================
  Hits          277      277              
- Misses         24       29       +5     
Impacted Files Coverage Δ
src/convention/scitype.jl 58.00% <0.00%> (-6.45%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8bb610c...d2ff22e. Read the comment docs.