## 3 Data and Methodology
### Methodology
#### 3.2.2 Dynamic FSM
Algorithm 1 is as follows:  
Input: entity labels E1 of address elements, global FSM set \(W\)  
Output: dynamic FSM E3  
function generateDynamicFSM(\(E1\), \(W\)):  
// initialize the sextuple of dynamic FSM \(E3\)  
\(Q_{i}=\{\}\)  
\(\Sigma_{i}\) = set of all entity labels in \(E1\)  
\(\delta_{i}=\{\}\) // state transition function, initialized as an empty set  
\(q_{i}=\{\}\) // initial state set, initialized as an empty set  
\(F_{i}=\{\}\) // final state set, initialized as an empty set  
\(E3=(W,Q_{i},\Sigma_{i},\delta_{i},q_{i},F_{i})\)  
// on each path \(P\) in \(W\), do  
for each \(P_{i}\) in \(W\):  
// obtain the entity labels \(E2\) of the address elements of the path \(P\)  
\(E2=\) entity labels in path \(P_{i}\)  
// determine whether every element in \(E1\) is contained in \(E2\)  
if all entity labels in \(E1\) are in \(E2\):  
// select this path \(P\) for the sorting and organizing the entity labels  
// traverse \(E1\) in \(E2\) and record the positions of the entity elements of \(E1\) with respect to \(E2\)  
indices = []  
for each e in \(E1\):  
index = index of e in \(E2\)  
append index to indices  
// sort the entity elements of \(E1\) according to the index in indices  
_sorted_E1 = [\(E1\)[\(i\)] for \(i\) in sorted(indices)]  
// sort the entity elements of \(E2\) according to the index in indices  
_sorted_E2 = [\(E2\)[\(i\)] for \(i\) in sorted(indices)]  
// add the sorted entity elements to the state set \(Q_{i}\) as new states  
\(q_{i}=(sorted\_E2,P)\)  
add \(q_{i}\) to \(Q_{i}\)  
// update the state transition function \(\delta\)  
for \(i\) in range(len(sorted_E2)-1):  
\(s=(sorted\_E2\)[\(i\)], _sorted_E2[\(i+1\)])  
\(s\_next=(sorted\_E2\)[\(i+1\)],)  
if \(s\) not in \(\delta\):  
\(\delta_{i}\) [\(s\)] = set()  
\(\delta_{i}\) [\(s\)].add(\(s\_next\))  
return E3 In this study, the Jin Rong Yue Hui Cheng Convenience Store (the northeast corner of the intersection between Yongzhou Road and Xunhang Road) was taken as an example to visualize the generation of dynamic FSM, as shown in Figure 3.  
There are missing address elements in the Jin Rong Yue Hui Cheng Convenience Store (northeast corner of the intersection between Yongzhou Road and Xunhang Road), and the structure is disordered. As shown in Figure 3, the entity labels of the address elements (E1 for short) were obtained first, including POI1, JD1, JD2, JJK, and DIR. Subsequently, the entity labels of the obtained address elements were organized by considering the global FSM set (W). The specific steps are as follows:  
1. Traverse path P in W to obtain the entity label of the address element (P[i]) of each path. 2. Determine whether each element in E1 is contained in P[i]. If yes, the path was selected as E2. 3. Traverse from E1 to E2. If the label element in E1 was consistent with that in E2, the index of the element was recorded. 4. Finally, the indices were sorted from small to large to obtain a new dynamic FSM (E3; blue represents the initial state of the dynamic FSM, and pink represents the final state). Finally, the text of the address information was obtained based on the text index corresponding to each entity label of the address element. When implementing the dynamic FSM, there is no need to include keywords or set thresholds. However, by setting all entity label types of address elements as a global FSM set, the corresponding dynamic FSM set could be obtained based on the entity label of the \(i\)th address element in the text from the internet. This method is suitable for parsing  
Figure 3: Visualization of the dynamic FSM for address instance acquisition. standard and non-standard addresses, which cannot be accomplished using FSM and bidirectional FSM. Owing to the limited types of entity labels of address elements and good compatibility with uncommon keywords of address elements or ambiguously oriented keywords, the dynamic FSM abandons the collection of keywords and adopts the collection of entity labels of address elements, forming the global FSM set.