Skip to content.

Find topic

Web tools

Help

Tools

       Analysis Tool Bar  +
    /td<&/tr>
-->
Main > Projects > TAPoRware > TAPoRwarePlainCollocates

Find Text — Collocation

See http://taporware/~taporware/textTools/collocation.shtml

Description

This tool takes a word from the user and returns all the words directly before and directly after it based on the given context (i.e. words, lines, sentences) and context length. Results can be sorted alphabetically, by frequency, or by Z-score (an indication of how far and in what direction that item deviates from its distribution's mean, expressed in units of its distribution's standard deviation).

Pseudocode

Ways of Using

Developing a Theme

This can be used to develop a theme. The collocates of a word (or words) that you are typical of a theme might suggest other words associated with the theme.

Semantic Field

The collocates for a target word or pattern might help you identify what words associate with the target. Be careful that some words that are collocates may not be in the same sentence or they might be collocates because they are high frequency words that appear as collocates randomly.

CGI Interface

If you want to use this tool from your web site, here is the CGI Interface: (Note: If you want to upload local html text to the tool, you need to use attribute name/value pair: enctype="multipart/form-data" within the form tag)

Here are the parameters:

Parameter Name Parameter Value Control Type Default Description
source url/local radio button url Let user select input text (either a url or a local path to upload text source)
texturl   text   A Valid URL pointing to any plain text, html or xml text
localFile   file   The path to your local text file
find_pattern   text   key word/pattern of the concordance
glasgow   checkbox checked Indicate if Glasgow stop words should be excluded
context Word/Line/ Sentence/Paragraph selection Word context type
contLength   text 5 context length corresponding to the selected context
sorting 1/2/3 selection 1 co-occurrence words sorting: by frequency/alphabetically/by zscore corresponding the order of this parameter values
HowToList 1/2/3/4 selection 1 Display format which are HTML/XML text in HTML/XML tree/Tab delimited text in the order of parameter values
taporface   checkbox checked display result in a new window without graphics interface (default) or with taporware interface in the same window

Use Find Text -- Collocation TAPoRware Tool in Your Web Page

You can add a text field and a button in your web page to get the concordance of the pattern you entered in that page by call TAPoRware cgi script.

Pattern:

Here is the code that you can cut and paste to your web pages:

<form method="post" name="textForm" enctype="multipart/form-data" target="_blank" action="http://taporware.mcmaster.ca/~taporware/cgi-bin/prototype/tcollocation.cgi" onsubmit="document.textForm.texturl.value=document.location.href">

<input type="hidden" name="source" value="url" />

<input type="hidden" name="texturl" />

<input type="hidden" name="freetext" value="yes"/>

Pattern: <input type="text" name="find_pattern" />

<input type="hidden" name="glasgow' value="true" />

<input type="hidden" name="context" value="Word" />

<input type="hidden" name="contLength" value="5" />

<input type="hidden" name="sorting" value="3" />

<input type="hidden" name="HowToList" value="1" />

<input type="hidden" name="taporface" value="same" />

<input type="submit" name="doIt" value="Get Collocates of the Page" />

</form>

Web Service Interface

Taporware provides web services to any non-benefit organizations. here is the taporware web services infomation:

Known Bugs

To Do

-- GeoffreyRockwell - 19 May 2005


Use this box to quickly add a comment to the page.

more options...