Research Article

Recognition of Chinese Legal Elements Based on Transfer Learning and Semantic Relevance

Algorithm 2

Element identification method for Chinese legal documents.
Input: Combination T of sentences and elements of legal instruments
Output: List of elements for each sentence
1.
2. For t in T do
3. Using the BERT model for sentence t.sen and element t.lab representations, it obtains the sentence vector bs, bl
4. Calculating similarity using cosine similarity
5. Calculation using schematic functions:
6. If I(x) =1: Result[t.sen].Attend(t.lab)
7. Else: Continu
8. End for
9. Return result