|
Visual Collocator
|
|
| sorting | 1/2/3 | selection | 1 | co-occurrence words sorting: by frequency/alphabetically/by zscore corresponding the order of this parameter values |
| taporface | | checkbox | checked | display result in a new window without graphics interface (default) or with taporware interface in the same window |
|
> > |
Use Visual Collocates TAPoRware Tool in Your Web Page
You can add a text field and a button in your web page to get the visual collocates of the pattern you entered in that page by call TAPoRware cgi script.
Here is the code that you can cut and paste to your web pages:
<form method="post" name="htmlForm" enctype="multipart/form-data" target="_blank" action="http://taporware.mcmaster.ca/~taporware/cgi-bin/prototype/bviscollocator_new.cgi" onsubmit="document.htmlForm.htmlurl.value=document.location.href">
<input type="hidden" name="source" value="url" />
<input type="hidden" name="htmlurl" />
<input type="hidden" name="freetext" value="yes"/>
<input type="hidden" name="tagtext" value="body" />
Pattern: <input type="text" name="find_patt" />
<input type="hidden" name="context" value="1" />
<input type="hidden" name="conLeng" value="5" />
<input type="hidden" name="sorting" value="3" />
<input type="hidden" name="taporface" value="same" />
<input type="submit" name="doIt" value="Visual Collocates" />
</form>
|
|
Web Service Interface
Taporware provides web services to any non-benefit organizations. here is the taporware web services information:
|
|
-
- contextLength -- length of context
- sorting -- values can be 1/2/3 corresponding to co-occurrence words by frequency/alphabetically/z-score
|
> > |
REST Service Interface
Taporware Rest service uses plain text HTTP protocol so that you can submit your request use either POST or GET method.
- Service URI: http://tapor1-dev.mcmaster.ca/~restserv/html/viscollocate.
- Parameters:
- htmlInput -- any HTML text
- htmlTag -- any valid HTML tag in your submitted HTML text
- pattern -- Unix styled pattern you want to find in the text
- glasgow -- true/false. If true, the glasgow stop words will be excluded
- context -- value can be 1/2/3/4 which corresponding to Words/Lines/Sentences/Paragraphs respectively
- contextLength -- number of words/lines/sentences/paragraphs before and after the specified context
|
|
Responsibility
This tool was programmed by Andrew MacDonald as part of the TAPoR project.
|
|
Visual Collocator
|
|
- set up graph visualization and initialize it using the graph data
- add listeners for various user actions: adding new collocates, deleting collocates, sticking/unsticking nodes
|
> > |
Ways of Using
- Enter a valid URL in the URL field or enter a local path to upload source text
- Enter a valid html or xml tag (multiple tags list separated by comma) if the text format is html or xml default is "body"
- Enter a word or pattern in the corresponding text field
- Check the "Exclude Glasgow Stop Words" checkbox if you don't want the Glasgow stop words
- Select the context of concordance and the length of context
- Select the collocates sorting criteria
- Select output format
- If you want the results displayed in the same window with taporware interface, uncheck the check box - "Open results in new window"
- Finally, click the "Submit" button
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 upload local html text) |
| htmlurl | | text | | A Valid URL that the pointed document should be an html text |
| localFile | | file | | The path to your local html text file |
| tagtext | | text | body | Valid html element (tag) name or multiple html element name separated by comma |
| find_patt | | text | | a word or pattern of the concordance |
| useStopWords | | checkbox | checked | check to exclude the Glasgow stop words |
| context | 1/2/3 | selection | Words (1) | context type corresponding the values in the parameter value field: Words/Lines/Sentences. |
| conLeng | | 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 |
| taporface | | checkbox | checked | display result in a new window without graphics interface (default) or with taporware interface in the same window |
Web Service Interface
Taporware provides web services to any non-benefit organizations. here is the taporware web services information:
- Endpoint URL: http://taporware.mcmaster.ca:9982
- Service URI: http://taporware.mcmaster.ca/~taporware/webservice
- Service Method: visual_collocates_HTML
- parameters:
- htmlInput -- any text string, if the text is in xml or html format, all tags will be stripped
- htmlTag -- any xml or html element (tag) name or multiple xml or html element name separated by comma if the source text is in the xml or html format
- pattern -- unix styled pattern or regular expression
- glasgow -- a boolean ("true" by default) to indicate if Glasgow stop words being excluded
- context -- value can be 1/2/3 which corresponding to Words/Lines/Sentences respectively
- contextLength -- length of context
- sorting -- values can be 1/2/3 corresponding to co-occurrence words by frequency/alphabetically/z-score
|
|
Responsibility
This tool was programmed by Andrew MacDonald as part of the TAPoR project.
|
|
Visual Collocator
Try It
|
< < |
Try it!
|
> > |
TOC: No TOC in "Main.TAPoRwareVisualCollocator"
|
|
Description
The Visual Collocator displays collocates of words using a graph layout. Any collocate can be double-clicked to fetch its collocates. Words which share similar collocates will be drawn together in the graph, producing new insight into the text.
|
< < |
Known Bugs
The browser will cache parts of the Java applet, preventing it from running new queries on different texts. Possible solutions are:
- close and re-open the browser
- open the Java console and push x to clear the classloader cache
|
> > |
This tool uses the prefuse library.
* This tool requires the JRE (v1.4.2 and up) in order to work properly.
Pseudocode
- extract text from website or local file
- load up applet, passing text and parameters from form
- get initial collocates and create graph data using the results
- set up graph visualization and initialize it using the graph data
- add listeners for various user actions: adding new collocates, deleting collocates, sticking/unsticking nodes
Responsibility
This tool was programmed by Andrew MacDonald as part of the TAPoR project.
|
|
|
< < |
-- AndrewMacdonald - 05 May 2006
|
> > |
-- AndrewMacdonald - 12 Jun 2006
|
|
|
> > |
| META FILEATTACHMENT | viscollocator.png | attr="" comment="" date="1150133419" path="viscollocator.png" size="2099" user="AndrewMacdonald" version="1.1" |
|