Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use this lib to measure the distance of two xmls #1

Open
likezjuisee opened this issue May 30, 2018 · 2 comments
Open

how to use this lib to measure the distance of two xmls #1

likezjuisee opened this issue May 30, 2018 · 2 comments

Comments

@likezjuisee
Copy link

Could you please show me an example?

@rhdekker
Copy link
Owner

Hi,

This project was an experiment to find the structural and textual differences between two XML files. The experiment was a success and the code was ported from Python to Java and moved to the Text As Graph as the TAG diff module.

Go here for the new code: https://github.com/HuygensING/TAG/tree/master/TAG-diff

Example on how to use it:

    Tokenizer tokenizer = new Tokenizer();
    List<TAGToken> tokensWa = tokenizer.convertXMLFileIntoTokens(new File("input_xml/witA-simple.xml"));
    List<TAGToken> tokensWb = tokenizer.convertXMLFileIntoTokens(new File("input_xml/witB-simple.xml"));
    TypeAndContentAligner aligner = new TypeAndContentAligner();
    List<Segment> segments = aligner.alignTokens(tokensWa, tokensWb);

@likezjuisee
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants