Research Article

Learning Users’ Intention of Legal Consultation through Pattern-Oriented Tensor Decomposition with Bi-LSTM

Algorithm 1

Pattern-oriented tensor decomposition method.
Input: Tensor which represents users’ legal consulting statement, , and tensor which is users’ legal
   consultation pattern, .
Output: The core tensor which is close to users’ legal consultation pattern in the layer of the tensor structure,
   , and its corresponding factor matrices and , , .
1 Initialize factor matrices and ;
2 for  to thresholdvalue  do
3   for to do
4     ;
5     , , ;
6     ;
7    end
8    for to do
9     ;
10     , , ;
11      ;
12  end
13 end
14  ;
15 return , , ;