|
Find Text — Collocation
See http://taporware.mcmaster.ca/~taporware/htmlTools/collocation.shtml
|
|
| finddisp | 1/2/3 | selection | 2 | Display format which are XML text in HTML/HTML/XML tree 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 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:
<table style="border: solid gray 1pt"><tr><td>
<form method="post" name="htmlForm" enctype="multipart/form-data" target="_blank" action="http://taporware.mcmaster.ca/~taporware/cgi-bin/prototype/hfindtext.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"/>
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="finddisp" value="1" />
<input type="hidden" name="sorting" value="3" />
<input type="hidden" name="taporface" value="same" />
<input type="submit" name="doIt" value="Get Collocate of the Page" />
</form>
</td></tr></table>
|
|
Web Service Interface
Taporware provides web services to any non-benefit organizations. here is the taporware web services information:
|
|
-
- sorting -- values can be 1/2/3 corresponding to co-occurrence words by frequency/alphabetically/z-score
- outFormat -- values are same as parameter "finddisp" in the CGI interface above
|
> > |
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/collocates.
- 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
- 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
- sorting -- sorting criteria. The values are 1/2/3 and corresponding to Co-occurring words By frequency/Alphabetically/By z-score respectively
- outFormat -- output format. The values are 1/2/3/4 and corresponding to HTML/XML tree/XML text in HTML/Tab delimited text
|
|
Known Bugs
To Do
|
|
Find Text — Collocation
See http://taporware.mcmaster.ca/~taporware/htmlTools/collocation.shtml
|
|
Ways of Using
- Enter a valid URL in the URL field or enter a local upload html text
|
< < |
- Enter a valid html tag or tag list seperated by comma, default is "body"
- Enter word or pattern in the corresponding text field by check the related radio button
|
> > |
- Enter a valid html tag or tag list separated by comma, default is "body"
- Enter a word or pattern in the corresponding text field by check the related radio button
|
|
- Select the context of concordance and the length of context
|
< < |
- Select the collocates sorting critieia
|
> > |
- 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
|
|
Here are the parameters:
|
< < |
|
> > |
|
|
| 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 multple html element name separated by comma |
|
> > |
| tagtext | | text | body | Valid html element (tag) name or multiple html element name separated by comma |
|
|
| findwhat | word/patt | radio button | word | let user to select either word or pattern of the key of the concordance |
| find_word | | text | | key word of the concordance |
| find_patt | | text | | key pattern of the concordance |
|
|
Web Service Interface
|
< < |
Taporware provides web services to any non-benefit organizations. here is the taporware web services infomation:
|
> > |
Taporware provides web services to any non-benefit organizations. here is the taporware web services information:
|
|
|
< < |
-
- htmlTag -- any html element (tag) name or multple html element name separated by comma
|
> > |
-
- htmlTag -- any html element (tag) name or multiple html element name separated by comma
|
|
-
- pattern -- unix styled pattern or regular expression
|
< < |
-
- context -- value can be 1/2/3 which coresponding to Words/Lines/Sentences respectively
|
> > |
-
- 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
- outFormat -- values are same as parameter "finddisp" in the CGI interface above
|
|
Find Text — Collocation
See http://taporware.mcmaster.ca/~taporware/htmlTools/collocation.shtml
|
|
CGI Interface
|
< < |
If you want to use this tool from you web site, here is the 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)
|
|
| 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 |
|
< < |
| finddisp | 1/2/3 | selection | 2 | Display foemat which are XML text in HTML/HTML/XML tree in the order of parameter values |
|
> > |
| finddisp | 1/2/3 | selection | 2 | Display format which are XML text in HTML/HTML/XML tree 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 |
Web Service Interface
|
|
Find Text — Collocation
See http://taporware.mcmaster.ca/~taporware/htmlTools/collocation.shtml
|
|
Pseudocode
|
> > |
- Obtain HTML string by URL or from user's local disk
- Obtain text contained by user specified tags
- Find user specified word/pattern along with user specified context -- concordance
- If user selects "sorting by z-score", perform span word counting and total words counting, and then calculate the values of z-score
- Otherwise, sort and count the words of the concordance text
- Generate output of the collocates of the concordance text
|
|
Ways of Using
|
> > |
- Enter a valid URL in the URL field or enter a local upload html text
- Enter a valid html tag or tag list seperated by comma, default is "body"
- Enter word or pattern in the corresponding text field by check the related radio button
- Select the context of concordance and the length of context
- Select the collocates sorting critieia
- 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 you 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 | Discription |
| 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 multple html element name separated by comma |
| findwhat | word/patt | radio button | word | let user to select either word or pattern of the key of the concordance |
| find_word | | text | | key word of the concordance |
| find_patt | | text | | key pattern of the concordance |
| 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 |
| finddisp | 1/2/3 | selection | 2 | Display foemat which are XML text in HTML/HTML/XML tree 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 |
|
|
Web Service Interface
|
> > |
Taporware provides web services to any non-benefit organizations. here is the taporware web services infomation:
- Endpoint URL: http://strange.mcmaster.ca:9982
- Service URI: http://strange.mcmaster.ca/~taporware/webservice
- Service Method: find_Collocation_HTML
- parameters:
- htmlInput -- any html string
- htmlTag -- any html element (tag) name or multple html element name separated by comma
- pattern -- unix styled pattern or regular expression
- context -- value can be 1/2/3 which coresponding 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
- outFormat -- values are same as parameter "finddisp" in the CGI interface above
|
|
Known Bugs
To Do
|