Tools Home : HTML Tools : Compare Two Documents

Click here to show HTML tools HTML Tools

Click here to expand XML tools XML tools

Click here to expand plain text tools Plain Text Tools

Click here to expand other tools Other tools

 Beta tools
 Add Tools Demo
 Manual
 About

Compare Two Documents
?
Summary

This tool is used to compare words within two HTML documents, either located at a specified web address or uploaded from the user's files.

Words for comparison can be limited to specific HTML tags, and then filtered further by searching a particular word, searching a pattern, searching either for the words or excluding only the words on a user-specified list. or excluding words from TAPoR's modified Glasgow Stop Words list. If no tag is specified, the tool defaults to 'body'.

Results can be sorted by the top words in the first document or by the ratio of relative counts in both documents. The list can then be displayed in an HTML or tab delimited format.

Please click the ? buttons at the bottom right of each set of options for more information on that set.

For further information on this tool, please see the TADA Wiki's Comparator entry here. A glossary of terms is also available here.

Walkthrough

To compare texts from http://www.ucc.ie/celt/published/E850003-007/text001.html and http://www.ucc.ie/celt/published/E850003-008/text001.html, search only the text between the <body> and </body> tags, filter out words that appear in the modified Glasgow Stop Words list and sort the results by ratio of relative word count:
  1. Source text
    1. Enter ‘http://www.ucc.ie/celt/published/E850003-007/text001.html’ into the first ‘URL’ field.
    2. Enter ‘http://www.ucc.ie/celt/published/E850003-008/text001.html’ into the second ‘URL’ field.
  2. Words to compare
    1. Enter ‘body’ in the ‘Elements’ field.
    2. Click the radio button next to ‘Words not in the list below’.
    3. Click the radio button next to ‘Use modified Glasgow Stop Words
  3. Results
    1. Select ‘Ratio of relative count’ from the 'Sort' drop-down list.
    2. Select ‘HTML’ from the ‘Display as’ drop-down menu.
  4. Click the ‘Submit’ button to process the text.
*
» Source text
  Example: http://taporware.ualberta.ca/einstein-bio.html

?
Summary

This section determines the source of the document you wish the tool to process. HTML can be obtained either from a web address or by uploading a file.

Fields

Source URL
To use content from a web page, enter a full web address (URL) in the field provided. Copy and paste from your browser’s address bar for best results.

Local file
To upload an HTML (.html) file from your computer, choose ‘Local file,’ click ‘Browse,’ and select the file you wish to use from your directory.
*
» Source text
  Example: http://www.philosophypages.com/ph/socr.htm

?
Summary

This section determines the source of the document you wish the tool to process. HTML can be obtained either from a web address or by uploading a file.

Fields

Source URL
To use content from a web page, enter a full web address (URL) in the field provided. Copy and paste from your browser’s address bar for best results.

Local file
To upload an HTML (.html) file from your computer, choose ‘Local file,’ click ‘Browse,’ and select the file you wish to use from your directory.
» Words to compare
(separate multiple elements with a `,')





(separate words by ',')
?
Summary

This section applies limits to the source text based on word filtering techniques.

Fields

All words
All words from within the specified element will be included in the word list.

Elements
Specify which HTML elements to look within, such as ‘body’ or ‘p’. Multiple elements may be listed, separated by a comma. This field defaults to ‘body,’ which will provide all body text from the source.

Words matching pattern
Only words matching a regular expression provided by the user will be included in the word list.

Words in the list below
Only words specified by the user will be included in the list. Type the list of desired words in manually or upload a text (.txt) file containing their list.

Words not in the list below
Only words not in a user-specified list or the modified Glasgow Stop Words list will be included in the final list. To use a custom list, type it in manually or upload a text (.txt) file containing the list.

Word list typed in
Type a list of words separated by commas into this field to include or exclude those words from the final list. To include the typed words, choose ‘Words in the list below’, and to exclude them, choose ‘Words not in the list below’.

Text file with words
Use this field to upload a text (.txt) file of words to include or exclude. The list must be separated by commas (ex: red, orange, green, purple). To include only the words contained within the text file in the final list, choose ‘Words in the list below.’ To exclude the words instead, choose ‘Words not in the list below.’

Use modified Glasgow Stop Words
Choose this option to filter the modified Glasgow Stop Words list out of the final list.
» Results
?
Summary

This section allows users to choose how the results will be formatted, and whether to display it in a new browser window.

Fields

Sort
Use this drop-down list to sort the results either according to the word count of Text 1 or by the ratio of relative word counts in Text 1 and Text 2.

Display as
Use this drop-down list to format the results in HTML as tab-delimited text.

Open results in new window
Check this box to display the results in a new window or browser tab. This option is selected by default. Some pop-up blockers may prevent a new window from being opened; if so, un-check the box to open the results in the same window instead.

 

 

TAPoRware Project, McMaster University,