Skip to content

Commit bef567b

Browse files
committed
fixed small bugs in display function and further troubleshooting with inlinestrings in make_S_matrix
1 parent 843f327 commit bef567b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/display.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ function display_matrix(
7373
rownames = data[:,target_col]
7474
colnames = ["S$i" for i in 1:size(M,2)]
7575
elseif M_type == :F || M_type == "F"
76-
rownames = colnames = [cue_obj.i2f[i] for i in 1:size(M,2)]
76+
rownames = [cue_obj.i2f[i] for i in 1:size(M,1)]
7777
colnames = ["S$i" for i in 1:size(M,2)]
7878
elseif M_type == :G || M_type == "G"
79-
rownames = ["S$i" for i in 1:size(M,2)]
79+
rownames = ["S$i" for i in 1:size(M,1)]
8080
colnames = [cue_obj.i2f[i] for i in 1:size(M,2)]
8181
elseif M_type == :A || M_type == "A"
82-
rownames = [cue_obj.i2f[i] for i in 1:size(M,2)]
82+
rownames = [cue_obj.i2f[i] for i in 1:size(M,1)]
8383
colnames = [cue_obj.i2f[i] for i in 1:size(M,2)]
8484
elseif M_type == :R || M_type == "R"
8585
rownames = data[:,target_col]

src/make_semantic_matrix.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,9 +1755,10 @@ Merge base f2i dictionary and inflectional f2i dictionary.
17551755
function merge_f2i(base_f2i, infl_f2i, n_base_f, n_infl_f)
17561756
# add infl_f2i into base_f2i
17571757
# infl_f2i need shift n_base_f
1758-
f2i = copy(base_f2i)
1758+
#f2i = copy(base_f2i)
1759+
f2i = Dict(inlinestring2string(k)=>v for (k,v) in base_f2i)
17591760
for (k, v) in infl_f2i
1760-
f2i[k] = v + n_base_f
1761+
f2i[inlinestring2string(k)] = v + n_base_f
17611762
end
17621763
f2i
17631764
end

0 commit comments

Comments
 (0)