Tools Home : XML Tools : Find Text -- Collocation

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

Find Collocates
?
Summary

This tool searches for a word or pattern and places it into a user-defined context of words, sentences, lines or paragraphs within an XML (.xml) document located either at a user-specified web address or uploaded from the user’s files. The results can be sorted alphabetically, by frequency or by Z-score (a measure of how far and in what direction that word deviates from it’s distribution’s mean in units of its standard deviation).

Note: When the set context is large, it is likely that the word or pattern searched will appear more than once in a given context. In this instance, the word or pattern will be counted more than once, decreasing the accuracy of the count and Z-score. For this reason, the best results are returned from small contexts.

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 Collocation entry here. A glossary of terms is also available here.

Walkthrough

To generate collocates for text found within http://www.xml.com/1999/03/ie5/first-x.xml, extract text from between <para> and </para>, limit the results to strings of text that contain 'Microsoft', generate a list of the five words appearing before and after each instance, sort the results by frequency and display it as HTML:
  1. Source text
    1. Enter ‘http://www.xml.com/1999/03/ie5/first-x.xml’ into the ‘URL’ field.
  2. Subtext limited to
    1. Enter ‘para’ in the ‘Elements’ field, leaving ‘Attribute name’ and ‘Attribute value’ blank.
  3. What to find
    1. Enter ‘Microsoft’ into the ‘Word/Pattern’ field.
  4. Context for concordance
    1. Set the ‘Context’ drop list to ‘Words’.
    2. Enter ‘5’ into the ‘Context length’ field.
  5. Results
    1. Set the ‘Sort’ drop menu to ‘Co-occurring words by frequency’.
    2. Set the ‘Display as’ drop menu to ‘HTML’.
  6. Click the ‘Submit’ button to process the text.
*
» Source text
  Example: http://taporware.ualberta.ca/sampleDocs/interact2.xml

?
Summary

This section determines the source of the document you wish the tool to process. XML 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) ending in .html in the field provided. Copy and paste from your browser’s address bar for best results.

Local file
To upload an XML (.xml) file from your computer, choose ‘Local file,’ click ‘Browse,’ and select the file you wish to use from your directory.
» Subtext limited to
?
Summary

This section determines which elements to extract text from. Users can also specify the attribute name or name/value pair modifying the element.

Fields

Elements
Determines which XML elements to extract text from. Multiple tags must be separated by commas. This field cannot be left blank.

Attribute name
Use this field to specify an attribute name that modifies the element listed above. Only instances the element with this attribute will have text extracted from them.

Attribute value
Use this field to specify an attribute value modifying the element and attribute name listed above. The attribute value must be paired with an attribute name. Only instances the element with this attribute name/value pair modifying it will have text extracted from them.
*
» What to find
?
Summary

This section determines what to search for within the document.

Fields

Word/Pattern to find
Users can filter results based on the word, phrase or pattern (regular expression) entered here. To search multiple words without the tool treating them as a phrase, separate words with commas (Ex: red, orange, purple). To search for a phrase, enter it as it appears in the text - quotation marks are not needed (Ex: wine-dark sea, not "wine-dark sea"). Unix-style searching may also be used.

Exclude modified Glasgow Stop Words
Choose this option to filter the modified Glasgow Stop Words list out of the final list.
» Context for concordance



?
Summary

This section allows the user to define the context type and how many of that type to show on either side of each instance of the word or pattern. Users can either ignore XML elements or use them as part of the context.

Fields

Ignore elements
Choose this option to remove all XML elements from the results and just display the text within them.

Context
Context can be set to one of three options from the drop menu: by words, lines, or sentences.

Context length
Enter the number of words, lines or sentences to include before and after the word/pattern.

Use elements
Choose this option to include XML elements in the results.

Closest Element
Click the radio button to show the XML element in which the text is found.

Surrounding Element
This option allows users to specify a particular XML element as the context for the word or pattern.
» 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
This drop menu allows users to select from three sort options for co-occurring words: by frequency, alphabetically or by Z-score.

Display as
This drop-down lists enables users to choose from several output formats: HTML, XML text in HTML, XML tree, and Tab delimited text.

Open results in new window
Checking this box will display the results in a new window. 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.
`*' indicates a required field

 

 

TAPoRware Project, McMaster University,