This codebase contains implementation of the paper:
Zheng, Yuyan, et al. "Entity set expansion with meta path in knowledge graph." Pacific-Asia conference on knowledge discovery and data mining. Springer, Cham, 2017. [Paper]
To run the model, execute the following command: $ python main.py --seed_dir actor --seed_num 2
Available datasets are:
actor
software
movie
scientist
The codebase is implemented in Python 3.6. Required packages are:
numpy 1.19.5
tqdm 4.62.3
This method show in get_candidate.py
. It is used to obtain the candidates based on the seeds.
- Step 1 obtains entity types of each seed.
- Step 2 generates the initial common candidates types by the intersection operation.
- Step 3 filters the initial candidates types with the concept hierarchy structure.
- Step 4 extracts candidate entities satisfying the ultimate candidates types.
The goal is to automatically discover meta paths between seeds, shown in get_path.py
- Treenode edge is link(get_tree.py)
- Get seed pair
- judges whether the link is in the set of the given link type, whether the neighbor node isn’t visited before.
- Choose the tree node with max number of source set
- Choose the tree node with min number of tuples
- Get the weight of meta path using heuristic weight learning method, shown in
get_path.py
. - combine meta paths to get the following ranking model, shown in
order.py
.