Skip to main content
. 2025 Sep 10;15:103615. doi: 10.1016/j.mex.2025.103615

Algorithm 1.

Word shape Encoding (a).

1 Input: the j-th word in sentences (wj)
2 Output: the j-th word shape in sentences (aj)
3 Initialization: array of word shape in j-th word (ajk)
4 fork=1tolength(wj)do {iterations}
5  ifwjkisnumericthenajk=“d”
6  else ifwjkis not alphanumericsthenajk=wjk
7  else ifwjkis uppercasethenajk=“X”
8  else ifwjkis lowercasethenajk=“x”
9  end if
12 end for