Skip to content

Calculate page similarity based on page UI tree structure for JSON files by Droidbot and XML files by adb uiautomator

Notifications You must be signed in to change notification settings

lixiaoming233/ui_tree_similarity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ui_tree_similarity

Calculate page similarity based on page UI tree structure.

PyV

Reference

Referred to Li Jingyang, Zhang Bo. Method and device for determining the similarity of web page structure

Based on code implementation of HTMLSimilarity.

Method of use

from utils import get_xml_similarity
from adapter import json2xml

is_similarity, value = get_xml_similarity(doc1, doc2)

See main.py for details on how to use it.

Three document types are supported:

  1. json file exported by Droidbot
  2. xml file exported by adb uiautomator
  3. html file

Description

Input parameters:
  • document 1
  • document 2
  • dimension after dimensionality reduction, default is 5000
  • threshold, default is 0.1
  • phrase type, default is 'xml', optionally 'lxml'
Return value:
  • whether or not it is similar
  • similar value (similar for value < tol, not similar for value > tol)

About

Calculate page similarity based on page UI tree structure for JSON files by Droidbot and XML files by adb uiautomator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages