Skip to content

Commit a245758

Browse files
committed
add matrix output to README example
1 parent 52e8126 commit a245758

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ MLJ.fit!(mach)
3333
tfidf_mat = transform(mach, tokenize.(docs))
3434
```
3535

36+
The resulting matrix looks like:
37+
```
38+
2×11 adjoint(::SparseArrays.SparseMatrixCSC{Float64, Int64}) with eltype Float64:
39+
0.234244 0.0 0.234244 0.0 0.234244 0.0 0.234244 0.234244 0.234244 0.0 0.0
40+
0.0 0.281093 0.0 0.281093 0.0 0.281093 0.0 0.0 0.0 0.281093 0.281093
41+
```
42+
3643
Functionality similar to Scikit-Learn's implementation with N-Grams can easily be implemented using features from `TextAnalysis`. Then the N-Grams themselves (either as a dictionary of Strings or dictionary of Tuples) can be passed into the transformer. We will likely introduce an additional transformer to handle these types of conversions in a future update to `MLJText`.
3744
```julia
3845

0 commit comments

Comments
 (0)