diff --git a/.github/workflows/check-help-docs.yml b/.github/workflows/check-help-docs.yml new file mode 100644 index 0000000..02e6437 --- /dev/null +++ b/.github/workflows/check-help-docs.yml @@ -0,0 +1,26 @@ +name: Check Help Docs + +# Validates the NLP++ Help markdown on every PR / push that touches it: +# fails on broken .md links, broken image links, or table/index drift. +# (Runs on windows-latest because Help/check-help-docs.ps1 uses Windows path logic.) + +on: + pull_request: + paths: + - 'Help/markdown/**' + - 'Help/check-help-docs.ps1' + - '.github/workflows/check-help-docs.yml' + push: + branches: [ main ] + paths: + - 'Help/markdown/**' + - 'Help/check-help-docs.ps1' + +jobs: + check: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Validate help docs (links, images, table/index drift) + shell: pwsh + run: ./Help/check-help-docs.ps1 diff --git a/Help/check-help-docs.ps1 b/Help/check-help-docs.ps1 index 046f153..6bf8469 100644 --- a/Help/check-help-docs.ps1 +++ b/Help/check-help-docs.ps1 @@ -8,10 +8,13 @@ is reported only as INFORMATION, never as an error to auto-fix. Reports: - 1. Broken links - any ](*.md) reference in the corpus that does not resolve. - 2. Orphaned pages - *.md files not referenced from index.md (legacy candidates). - 3. Table/index drift- pages linked from a Table_of_* but absent from index.md. - 4. Engine coverage - (info) engine function/action names with no help page. + 1. Broken links - any ](*.md) reference in the corpus that does not resolve. + 1b. Broken images - any  reference that does not resolve. + 2. Orphaned pages - *.md files not referenced from index.md (legacy candidates). + 3. Table/index drift- pages linked from a Table_of_* but absent from index.md. + 4. Engine coverage - (info) engine function/action names with no help page. + 5. Empty stubs - (-Stubs) current pages with empty Returns/Example/etc. + 6. Orphaned images - (-Images) image files on disk referenced by no page. .PARAMETER HelpDir Path to the Help/markdown directory. Defaults to ./markdown relative to this script. @@ -26,7 +29,8 @@ param( [string]$HelpDir = (Join-Path $PSScriptRoot 'markdown'), [string]$EnginePath = 'c:\git\nlp-engine\lite', - [switch]$Stubs # also report current pages with empty Returns/Example/Remarks sections + [switch]$Stubs, # also report current pages with empty Returns/Example/Remarks sections + [switch]$Images # also list orphaned image assets (on disk but referenced by no page) ) if (-not (Test-Path $HelpDir)) { Write-Error "HelpDir not found: $HelpDir"; exit 2 } @@ -54,6 +58,23 @@ Write-Host "== 1. Broken .md links ($($broken.Count)) ==" -ForegroundColor Cyan $broken | Sort-Object | ForEach-Object { Write-Host " $_" } $issues += $broken.Count +# --- 1b. Broken image links --------------------------------------------------- +$brokenImg = @() +foreach ($f in $allMd) { + $txt = Get-Content $f.FullName -Raw + foreach ($m in [regex]::Matches($txt, '!\[[^\]]*\]\(([^)]+)\)')) { + $tgt = $m.Groups[1].Value + if ($tgt -match '^https?://') { continue } + $tgt = ([uri]::UnescapeDataString($tgt) -split '#')[0].Trim() + if (-not $tgt) { continue } + if (-not (Test-Path (Join-Path $f.DirectoryName $tgt))) { + $brokenImg += '{0} -> {1}' -f $f.FullName.Substring($HelpDir.Length+1), $tgt + } + } +} +Write-Host "`n== 1b. Broken image links ($($brokenImg.Count)) ==" -ForegroundColor Cyan +$brokenImg | Sort-Object | ForEach-Object { Write-Host " $_" } + # --- 2. Orphaned flat pages (not referenced from index.md) -------------------- $flat = $allMd | Where-Object { $_.DirectoryName -eq $HelpDir -and $_.Name -ne 'index.md' } $orphans = $flat | Where-Object { $indexTxt -notmatch [regex]::Escape('(' + $_.Name + ')') } | @@ -126,7 +147,29 @@ if ($Stubs) { $rows | Sort-Object Page | ForEach-Object { Write-Host (" {0,-22} {1}" -f $_.Page, $_.Empty) } } +# --- 6. Orphaned image assets (opt-in via -Images) ---------------------------- +if ($Images) { + $assetRoot = Split-Path $HelpDir # Help/ + $imgFiles = Get-ChildItem -Path $assetRoot -Recurse -File -Include *.gif,*.png,*.jpg,*.jpeg + $refset = @{} + foreach ($f in $allMd) { + $txt = Get-Content $f.FullName -Raw + foreach ($m in [regex]::Matches($txt, '!\[[^\]]*\]\(([^)]+)\)')) { + $tgt = $m.Groups[1].Value + if ($tgt -match '^https?://') { continue } + $tgt = ([uri]::UnescapeDataString($tgt) -split '#')[0].Trim() + if (-not $tgt) { continue } + try { $r = [System.IO.Path]::GetFullPath((Join-Path $f.DirectoryName $tgt)) } catch { continue } + $refset[$r.ToLower()] = $true + } + } + $orphanImg = $imgFiles | Where-Object { -not $refset.ContainsKey($_.FullName.ToLower()) } + Write-Host "`n== 6. Orphaned image assets: on disk but referenced by no page ($($orphanImg.Count)) ==" -ForegroundColor Cyan + Write-Host " (informational; paths relative to Help/)" + $orphanImg | ForEach-Object { Write-Host (" " + $_.FullName.Substring($assetRoot.Length+1)) } +} + Write-Host "`n--- summary ---" -ForegroundColor Green -Write-Host ("broken links: {0} orphaned pages: {1} table/index drift: {2}" -f $broken.Count, $orphans.Count, $tableDrift.Count) -# Exit non-zero only on hard errors (broken links / table-index drift), so it can gate CI. -if (($broken.Count + $tableDrift.Count) -gt 0) { exit 1 } else { exit 0 } +Write-Host ("broken links: {0} broken images: {1} orphaned pages: {2} table/index drift: {3}" -f $broken.Count, $brokenImg.Count, $orphans.Count, $tableDrift.Count) +# Exit non-zero on hard errors (broken .md links / broken images / table-index drift) so it can gate CI. +if (($broken.Count + $brokenImg.Count + $tableDrift.Count) -gt 0) { exit 1 } else { exit 0 } diff --git a/Help/helps/$allcaps.htm b/Help/helps/$allcaps.htm deleted file mode 100644 index e970c84..0000000 --- a/Help/helps/$allcaps.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - -
- -Check if the token underlying the node is all uppercase.
- -returnedBoolean = variableType("$allcaps")
- -returnedBoolean - type: int
-variableType - type: N
Returns 1 if the token is all - uppercase and 0 if not. If multiple - words (even if all words are capitalized) returns 0.
- -None.
- -- -
$cap, $lowercase, - $mixcap, $uppercase, - Special Variables
- -- - - - diff --git a/Help/helps/$anaspath.htm b/Help/helps/$anaspath.htm deleted file mode 100644 index a0224d0..0000000 --- a/Help/helps/$anaspath.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the parent folder for the analyzer folders.
- -returnedString = variableType("$anaspath")
- -returnedString - type: str
-variableType - type: G
$anaspath returns "D\apps\Resume" assuming the app directory is "D\apps\".
- -$apppath, $kbpath, $input, - $inputhead, $inputname, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$apppath.htm b/Help/helps/$apppath.htm deleted file mode 100644 index ef69fe3..0000000 --- a/Help/helps/$apppath.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
Get the base directory path for the current application.
- -returnedString = variableType("$apppath")
- -returnedString - type: str
-variableType - type: G
"D:\dev\apps\Resume".
- -$inputpath, Special - Variables
- -- - - - diff --git a/Help/helps/$cap.htm b/Help/helps/$cap.htm deleted file mode 100644 index 7bf6416..0000000 --- a/Help/helps/$cap.htm +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - -
Check if the token underlying the node is a capitalized word.
- -returnedBoolean = variableType("$cap")
- -returnedBoolean - type: int
-variableType - type: N
Returns 1 if the token is a - capitalized word and 0 if not.
- -|
- WARNING: $cap - is not identical to the @PRE action cap( ). $cap will traverse down to the leafiest node - it can find, in order to perform its check. The @PRE action only chains - down if the [s] flag is present in the associated phrase element(s). Also, - $cap is not stopped by a [base] attribute in a node. |
$allcaps, $lowercase, - $mixcap, $uppercase, - Special Variables
- -- -
- - - - diff --git a/Help/helps/$end.htm b/Help/helps/$end.htm deleted file mode 100644 index 957fbf9..0000000 --- a/Help/helps/$end.htm +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - -
Check if the referenced node has a right sibling in the - parse tree.
- -returnedBoolean = variableType("$end"[, number])
- -returnedBoolean - type: bool
-variableType - type: N or X
-number - type: int
Evaluates to 0 if the node has - a right sibling and 1 if the referenced - node does not have a right sibling.
- -@RULES
- -@@RULES
- -- -
- -
- - - - diff --git a/Help/helps/$exists.htm b/Help/helps/$exists.htm deleted file mode 100644 index 111c37b..0000000 --- a/Help/helps/$exists.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - -
Check if the node exists in the parse tree.
- -returnedBoolean = variableType("$exists"[, number])
- -returnedBoolean - type: bool
-variableType - type: N
-number - type: int
Returns 1 if the node exists - and 0 if the node does not exist.
- -@RULES
- -@@RULES
- -- -
- - - - diff --git a/Help/helps/$input.htm b/Help/helps/$input.htm deleted file mode 100644 index 085d7f5..0000000 --- a/Help/helps/$input.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the full input path for the file.
- -returnedString = variableType("$input")
- -returnedString - type: str
-variableType - type: G
$input returns "D:\apps\Resume\input\Dev1\rez.txt" if the - input file is "rez.txt".
- -$inputhead, $inputname, - $inputpath, $inputtail, - Special Variables
- -- - - - diff --git a/Help/helps/$inputhead.htm b/Help/helps/$inputhead.htm deleted file mode 100644 index 966abb0..0000000 --- a/Help/helps/$inputhead.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the head (name) of the input file.
- -returnedString = variableType("$inputhead")
- -returnedString - type: str
-variableType - type: G
$inputhead returns "rez" if the input file is "rez.txt".
- -$apppath, $input, - $inputname, $inputpath, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$inputname.htm b/Help/helps/$inputname.htm deleted file mode 100644 index 8f5517f..0000000 --- a/Help/helps/$inputname.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the name of the input file.
- -returnedString = variableType("$inputname")
- -returnedString - type: str
-variableType - type: G
$inputname returns "rez.txt" if the input file is "rez.txt".
- -$apppath, $input, - $inputhead, $inputpath, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$inputparent.htm b/Help/helps/$inputparent.htm deleted file mode 100644 index f305660..0000000 --- a/Help/helps/$inputparent.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the name of the parent directory of the input file.
- -returnedString = variableType("$inputparent")
- -returnedString - type: str
-variableType - type: G
$inputparent returns "Dev1" assuming input file is "D\apps\Resume\input\Dev1\text.txt".
- -$apppath, $input, - $inputhead, $inputname, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$inputpath.htm b/Help/helps/$inputpath.htm deleted file mode 100644 index 52fb545..0000000 --- a/Help/helps/$inputpath.htm +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - -
Get the path of the input file.
- -returnedString = variableType("$inputpath")
- -returnedString - type: str
-variableType - type: G
$inputpath returns "D\apps\Resume\input\Dev1" assuming input - file "rez.txt" resides in Dev1 directory.
- -$apppath, $input, - $inputhead, $inputname, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$inputtail.htm b/Help/helps/$inputtail.htm deleted file mode 100644 index f2a3575..0000000 --- a/Help/helps/$inputtail.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Get the tail (extension type) of the input file.
- -returnedString = variableType("$inputtail")
- -returnedString - type: str
-variableType - type: G
$inputtail returns "txt" if the input file is "rez.txt".
- -$apppath, $input, - $inputhead, $inputname, - $inputpath, Special - Variables
- -- - - - diff --git a/Help/helps/$isdirrun.htm b/Help/helps/$isdirrun.htm deleted file mode 100644 index e577fea..0000000 --- a/Help/helps/$isdirrun.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
Check if the engine is processing a directory of files instead of an individual file. Returns 1 if it is analyzing a directory, else 0.
- -returnedBoolean = variableType("$isdirrun")
- -returnedBoolean - type: int
-variableType - type: G
Returns 1 if processing a directory, 0 if not.
- -$isfirstfile, $islastfile, $inputpath, Special - Variables
- -- - - - diff --git a/Help/helps/$isfirstfile.htm b/Help/helps/$isfirstfile.htm deleted file mode 100644 index f56f00f..0000000 --- a/Help/helps/$isfirstfile.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
Checks to see if the current file is the first file being analzyed in a directory.
- -returnedBoolean = variableType("$isfirstfile")
- -returnedBoolean - type: bool
-variableType - type: G
Returns 1 if the current file is the first file, 0 if not.
- -$isdirrun, $islastfile, $inputpath, Special - Variables
- -- - - - diff --git a/Help/helps/$islastfile.htm b/Help/helps/$islastfile.htm deleted file mode 100644 index 489adf0..0000000 --- a/Help/helps/$islastfile.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
Checks to see if the current file is the last file being analzyed in a directory.
- -returnedBoolean = variableType("$islastfile")
- -returnedBoolean - type: int
-variableType - type: G
Returns 1 if the current file is the last file, 0 if not.
- -$isdirrun, $isfirstfile, $inputpath, Special - Variables
- -- - - - diff --git a/Help/helps/$kbpath.htm b/Help/helps/$kbpath.htm deleted file mode 100644 index d658c35..0000000 --- a/Help/helps/$kbpath.htm +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - -
Get the path for the kb / user.
- -returnedString = variableType("$kbpath")
- -returnedString - type: str
-variableType - type: G
$kbpath returns "D\apps\Resume\input\Dev1\kb\user" assuming the app directory - is "D\apps\Resume\input\Dev1" resides in Dev1 directory.
- -$apppath, $input, - $inputhead, $inputname, - $inputtail, Special - Variables
- -- - - - diff --git a/Help/helps/$length.htm b/Help/helps/$length.htm deleted file mode 100644 index 15dcb79..0000000 --- a/Help/helps/$length.htm +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - -
Get the length of node's text.
- -returnedNumber = variableType("$length"[, number])
- -returnedNumber - type: int
-variableType - type: N or X
-number - type: int
@RULES
- -@@RULES
- -- -
- - - - diff --git a/Help/helps/$lowercase.htm b/Help/helps/$lowercase.htm deleted file mode 100644 index 9bf10f2..0000000 --- a/Help/helps/$lowercase.htm +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - -
Check if the token underlying the node is all lowercase.
- -returnedBoolean = variableType("$lowercase")
- -returnedBoolean - type: int
-variableType - type: N
Returns 1 if the token is all - lowercase and 0 if not. If multiple - words (even if all words are lowercase) returns 0.
- -|
- WARNING: $lowercase is not identical to - the @PRE action lowercase( ). - $lowercase will traverse down to the leafiest node it can find, in order - to perform its check. The @PRE action only chains down if the [s] flag - is present in the associated phrase element(s). Also, $lowercase is not - stopped by a [base] attribute in a node. |
$allcaps, $cap, $mixcap, $uppercase, - Special Variables
- -- -
- - - - diff --git a/Help/helps/$mixcap.htm b/Help/helps/$mixcap.htm deleted file mode 100644 index 9b647e0..0000000 --- a/Help/helps/$mixcap.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - -
Check if the token underlying the node is a mixed-capitalized word. -
- -returnedBoolean = variableType("$mixcap")
- -returnedBoolean - type: int
-variableType - type: N
Returns 1 if the token is a - mixed-capitalized word and 0 if - not.
- -MIchigan, or abcD
- -$allcaps, $cap, $lowercase, $uppercase, - Special Variables
- -- -
- - - - diff --git a/Help/helps/$oend.htm b/Help/helps/$oend.htm deleted file mode 100644 index 97c0e7c..0000000 --- a/Help/helps/$oend.htm +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -
End offset of the referenced node in the input text.
- -variableType("$oend"[, number])
- -variableType - type: N or X
-number - type: int
@RULES
- -@@RULES
- -- -
- - - - diff --git a/Help/helps/$ostart.htm b/Help/helps/$ostart.htm deleted file mode 100644 index e12ead8..0000000 --- a/Help/helps/$ostart.htm +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -
Start offset of the referenced node in the input text.
- -variableType("$ostart"[, number])
- -variableType - type: N or X
-number - type: int
@RULES
- -@@RULES
- -- -
- - - - diff --git a/Help/helps/$raw.htm b/Help/helps/$raw.htm deleted file mode 100644 index e868146..0000000 --- a/Help/helps/$raw.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - -
Fetch 'cleaned up' text covered by the node from the text buffer. Leading - and trailing spaces are removed and separators are converted to single - space.
- -returnedString = variableType("$raw"[, number])
- -returnedString - type: str
-variableType - type: N or X
-number - type: int
@RULES
- -@@RULES
- -$treetext, $treeraw, - $text, - $xmltext, phraseraw, - phrasetext, Special - Variables
- -- -
- - - - diff --git a/Help/helps/$start.htm b/Help/helps/$start.htm deleted file mode 100644 index 98bf0d4..0000000 --- a/Help/helps/$start.htm +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - -
Check if the referenced node has a left sibling in the parse - tree.
- -returnedBoolean = variableType("$start"[, number])
- -returnedBoolean - type: bool
-variableType - type: N or X
-number - type: int
Evaluates to 0 if the node has - a left sibling and 1 if the referenced - node does not have a left sibling.
- -@RULES
- -@@RULES
- -- - - - diff --git a/Help/helps/$text.htm b/Help/helps/$text.htm deleted file mode 100644 index 5be0869..0000000 --- a/Help/helps/$text.htm +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - -
Fetch the 'cleaned up' text covered by the node. Leading and trailing - spaces are removed and separators are converted to single space.
- -returnedString = variableType("$text"[, number])
- -returnedString - type: str
-variableType - type: N or X
-number - type: int
Uses the original text buffer, rather than the subtree under the node, - in order to gather text.
- -@RULES
- -@@RULES
- -$treetext, $raw, - $treeraw, , $xmltext, - phraseraw, phrasetext, - Special Variables
- -- -
- - - - diff --git a/Help/helps/$treeraw.htm b/Help/helps/$treeraw.htm deleted file mode 100644 index 93f7484..0000000 --- a/Help/helps/$treeraw.htm +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - -
Fetch the text covered by the node from the parse tree. Leading and - trailing spaces are not removed and separators are not converted to single - space.
- -returnedString = variableType("$treeraw"[, number])
- -returnedString - type: str
-variableType - type: N or X
-number - type: int
Analogous to $treetext.
- -@RULES
- -@@RULES
- -$treetext, $text, - $raw, , $xmltext, phraseraw, phrasetext, - Special Variables
- -- - - - diff --git a/Help/helps/$treetext.htm b/Help/helps/$treetext.htm deleted file mode 100644 index b023b59..0000000 --- a/Help/helps/$treetext.htm +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - -
Fetch 'cleaned up' text gleaned from a node's subtree. Leading and trailing - spaces are removed and separators are converted to single space.
- -returnedString = variableType("$treetext"[, number])
- -returnedString - type: str
-variableType - type: N or X
-number - type: int
Uses the parse tree as input, not text buffer. $treetext is analogous - to $text. The difference between $treetext and $text is $text returns - text from the input text buffer while $treetext returns text from the - parse tree. If you have removed some nodes from a tree with an excise(), - $treetext returns the text minus the excised elements, while $text returns - everything in the input text buffer, including the text under excised - nodes.
- -@POST
-
-
-@@POST
@RULES
- -@@RULES
- -$text, $treeraw, - $raw, , $xmltext, phraseraw, phrasetext, - Special Variables
- -- -
- -
- - - - diff --git a/Help/helps/$unknown.htm b/Help/helps/$unknown.htm deleted file mode 100644 index c01a181..0000000 --- a/Help/helps/$unknown.htm +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - -
Check if the token underlying a node is an unknown word. -
- -returnedBoolean = variableType("$unknown"[, number])
- -returnedBoolean - type: bool
-variableType - type: N
-number - type: int
Returns 1 if the token is an - unknown word and 0 if the token - is a known word.
- -Requires a lookup( ) CODE Action - prior to any use of this special variable.
- - -|
- WARNING: - This special variable is not identical to the @PRE - action, unknown(). $unknown - will traverse down to the leafiest node it can find, in order to perform - its check. The @PRE action only chains down if the [s] flag is present - in the associated phrase element(s). Also, $unknown is not stopped by - a [base] attribute in a node. |
@RULES
- -@@RULES
- -- -
- - - - diff --git a/Help/helps/$uppercase.htm b/Help/helps/$uppercase.htm deleted file mode 100644 index 2ce7361..0000000 --- a/Help/helps/$uppercase.htm +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - -
Check if the token underlying the node is all uppercase.
- -returnedBoolean = variableType("$uppercase")
- -returnedBoolean - type: int
-variableType - type: N
Returns 1 if the token is all - uppercase and 0 if not. If multiple - words (even if all words are capitalized) returns 0.
- -|
- WARNING: $uppercase - is not identical to the @PRE action uppercase( - ). $uppercase will traverse down to the leafiest node it can find, in - order to perform its check. The @PRE action only chains down if the [s] - flag is present in the associated phrase element(s). Also, $uppercase - is not stopped by a [base] attribute in a node. |
$allcaps, $cap, $lowercase, $mixcap, - Special Variables
- -- -
- - - - diff --git a/Help/helps/$xmltext.htm b/Help/helps/$xmltext.htm deleted file mode 100644 index 3055893..0000000 --- a/Help/helps/$xmltext.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - -
Fetch 'cleaned up' text covered by the node from the text buffer, converting - special characters to HTML and XML. Leading and trailing spaces are removed - and separators are converted to single space.
- -returnedString = variableType("$xmltext"[, number])
- -returnedString - type: str
-variableType - type: N or X
-number - type: int
"<" is converted to "<".
- -@RULES
- -@@RULES
- -$treetext, $treeraw, - $text, - Special Variables
- -- -
- - - - diff --git a/Help/helps/@@.htm b/Help/helps/@@.htm deleted file mode 100644 index 674b2d1..0000000 --- a/Help/helps/@@.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - -
A pass file marker used to indicate the end of a rule.
- -A region marker that indicates - the end of a CHECK Region.
- -- -
A region marker that indicates - the end of the CODE Region.
- -- -
- - - - diff --git a/Help/helps/@@MULTI.htm b/Help/helps/@@MULTI.htm deleted file mode 100644 index a2dfd61..0000000 --- a/Help/helps/@@MULTI.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
An optional end marker that indicates the termination of the @MULTI - Selector specification.
- -- - - - diff --git a/Help/helps/@@NODES.htm b/Help/helps/@@NODES.htm deleted file mode 100644 index 9a711b7..0000000 --- a/Help/helps/@@NODES.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
An optional end marker that indicates the termination of the @NODES - Selector specification.
- -- - - - diff --git a/Help/helps/@@PATH.htm b/Help/helps/@@PATH.htm deleted file mode 100644 index 8c8b20f..0000000 --- a/Help/helps/@@PATH.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
An optional end marker that indicates the termination of the @PATH Selector - specification.
- -- - - - diff --git a/Help/helps/@@POST.htm b/Help/helps/@@POST.htm deleted file mode 100644 index a01c778..0000000 --- a/Help/helps/@@POST.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
A region marker that indicates - the end of a POST Region.
- -- -
A region marker that indicates - the end of a PRE Region.
- -A region marker that indicates the end of a RECURSE Region.
- -A region marker that indicates the end of a RULES Region.
- -A region marker that indicates the end of a SELECT Region.
- -A region marker that indicates - the start of a CHECK Region.
- -- -
A region marker that indicates - the start of the CODE Region.
- -- -
- - - - diff --git a/Help/helps/@DECL.htm b/Help/helps/@DECL.htm deleted file mode 100644 index 0096818..0000000 --- a/Help/helps/@DECL.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - -
A region marker that indicates - the start of the DECL Region.
- -- -
- - - - diff --git a/Help/helps/@MULTI.htm b/Help/helps/@MULTI.htm deleted file mode 100644 index 9308168..0000000 --- a/Help/helps/@MULTI.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
A selector used in the Context Zone of the pass file. The - Context Zone specifies methods for selecting nodes in the parse tree.
- -- - - - diff --git a/Help/helps/@NODES.htm b/Help/helps/@NODES.htm deleted file mode 100644 index 079a4aa..0000000 --- a/Help/helps/@NODES.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - -
A selector used in the Context Zone of the pass file. The - Context Zone specifies methods for selecting nodes in the parse tree.
- -A selector used in the Context Zone of the pass file. The - Context Zone specifies methods for selecting nodes in the parse tree.
- -- - - - diff --git a/Help/helps/@POST.htm b/Help/helps/@POST.htm deleted file mode 100644 index aef7fd1..0000000 --- a/Help/helps/@POST.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -
A region marker that indicates - the start of a POST Region.
- -- -
A region marker that indicates - the start of a PRE Region.
- -A region marker that indicates the start of a RECURSE Region.
- -A region marker that indicates the start of a RULES Region.
- -A region marker that indicates the start of a SELECT Region.
- -The Ana Tab Popup menu is launched by right clicking in the Ana Tab - Window.
- -
|
- Menu - Item |
-
- Description |
| - | -
- Submenu for adding a pass to the analyzer - sequence. (See below.) |
|
- Attributes |
-
- Launches the Attribute - Editor dialog and displays the attributes belonging to the selected - pass' concept in the KB. (Note that the entire analyzer sequence is in - the KB.) User has option to delete, add or change names of attributes - and values. It is recommended not to alter system attributes such as algo, - data, active and type. |
|
- Delete |
-
- Deletes the selected pass from the analyzer - sequence. |
|
- Duplicate |
-
- Creates a new pass immediately following and - identical to a selected pass in the analyzer sequence. |
|
- Edit Pass - File |
-
- Opens the pass file of the selected pass in - the Workspace. (This is the same as double clicking on a pass in the analyzer - sequence.) You - should not try to edit automatically generated rules in a pass file. The - edits will not be saved when you regenerate the rules. |
|
- Highlight - Matches |
-
- Highlights words or phrases in a text file - matching selected pass in the Ana Tab or selected concept in the Gram - Tab. Must be selected before an analyzer is run over text. |
| - | -
- Submenu for viewing parse trees and other - windows relating to the current pass. (See - below.) |
|
- Ana Archive |
-
- Submenu for archiving the analyzer sequence - and pass files. (See - below.) |
|
- Properties |
-
- Launches the Pass - Properties dialog for non-system passes. (See below.) |
|
- Help |
-
- Launches the VisualText Help documentation. |
- -

|
- Menu Item |
-
- Description |
|
- Folder |
-
- Creates a folder for organizing passes. (Currently unavailable.) |
| - | -
- Submenu for selecting a pass file from an - existing library of passes. (See - below.) |
|
- Main |
-
- Creates a pass that will be executed first. (Currently - unavailable.) |
|
- New Pass |
-
- Creates a new pass and empty pass file. |
|
- Pass from - File |
-
- Launches an Open dialog to navigate to and - select existing pass file. Creates a new pass in the analyzer sequence - associating the existing pass file with it. |
|
- Stub |
-
- Creates a stub region, simultaneously adding - a stub concept in the Gram - Tab. |
| - | -
- Submenu for adding passes. (See - below.) |
- -

The Library Pass Submenu allows users to add a new pass and to associate - it with a pre-built pass file (or "library pass"). The contents - of this submenu adjust dynamically, depending on pass files that have - been placed in the release folder TextAI\VisualText\data\spec. - Users may add their own favorite or generic pass files to this folder. - The number - next to the library pass indicates the number of passes in the library - pass sequence. For - more information on the default library passes provided with VisualText, - see Library Passes.
- -- -

The available menu items in Add > - Top Level function identically with those of the Add - submenu. This menu provides - "hooks" for embedding sequences of passes within folders.
- -
This is identical with the Add > - Library Pass submenu. It provides a hook for placing a library - pass within a folder. This will be in an upcoming release of VisualText™. - The library - passes in this submenu are discussed in Library - Passes.
- -
|
- Menu Item |
-
- Description |
|
- Concept Tree |
-
- Displays the concept - tree of a parsed document in the Workspace. (Same as the View Concept - Tree button.) |
|
- Final Tree |
-
- Displays the parse tree after the final pass - of an analyzer sequence. |
|
- Entire Tree |
-
- Displays the full parse tree, starting at - the root, assuming that the current selection in the Text Tab has been - analyzed. |
|
- Log |
-
- Displays the text version of Entire Tree, - the parse tree for the currently selected pass. |
|
- Tree Matches |
-
- Displays portion of the parse tree matching - selected pass in the analyzer sequence. |
Ana Archive is used to view - and create archives of the analyzer sequence either on remote servers - or on local machines. Archiving - is used to create quick backups of your work and to facilitate communication - between developers working on the same analyzers. To - set archiving preferences, select Preferences - under the File Menu and click on the Archiving - tab.
- -
|
- Menu Item |
-
- Description |
|
- Archive Local |
-
- Launches a dialog box to create a local archive - of the pass files in a zip file. The name of the archive defaults to the - name of the current analyzer, suffixed with the current date and time. - |
|
- Archive Remote |
-
- Launches a dialog box to create a remote archive - of the current analyzer sequence in the Ana Tab. The - name of the archive defaults to the name of the current analyzer suffixed - with the current date and time. Archive - is created on the remote server. |
|
- View Local |
-
- Displays local archives in the Ana Archive - > View Local dialog. Presents options to delete, rename, upload (send - to server) or load into current analyzer Workspace. Listings - in the archive can be sorted by clicking on column headers. |
|
- View Remote |
-
- Displays server archives in the Ana Archive - > View Remote dialog. Presents options to delete, rename, download - (send to local archive) or load into current analyzer Workspace. Listings - in archive can be sorted by clicking on column headers. |

|
- Item |
-
- Description |
|
- Name |
-
- Name of the pass file associated with the - pass in the analyzer sequence. |
|
- Type |
-
- Type of algorithm for the pass. Type can be - either Pattern (for PAT algorithm) or Recursive (for REC algorithm) |
|
- Active |
-
- By default, a pass is active indicating that - it will not be skipped in the analyzer sequence. Unselecting Active will - cause the pass to be skipped during analysis. |
|
- To End |
-
- Makes passes after the current pass either - active or inactive. |
|
- All |
-
- Makes all passes either active or inactive. |
|
- From X to - X |
-
- Specifies a range of passes to make active - or inactive. |
|
- OK |
-
- Confirms changes to the Pass Properties dialog. |
|
- Cancel |
-
- Closes the Pass Properties dialog. |
VisualText analyzers are built from initial templates. - A template - is a starter or skeletal analyzer that can be copied and modified.
- -The templates contain a sequence of passes designed to help you perform - certain tasks. The - Database template for example, is an analyzer with passes that will allow - you to import an existing database into the knowledge base. The - Bare template is used to create the basic or minimal analyzer. It - contains only the tokenize pass. All - templates start with the tokenize pass.
- -The templates currently available are outlined below:
- - -|
- Name |
-
- Description |
|
- Bare |
-
- Minimal or basic analyzer. Contains - default system pass, tokenize only. |
|
- Database |
-
- Analyzer with sequence of passes to import - records from an existing database into the VisualText knowledge base. - (Passes - also available as library passes.) |
|
- DatesPlusNumbers |
-
- Analyzer with sequence of passes to recognize - simple and compound numeric words, numeric sequences and lists, various - character formatting such as punctuation and contractions, telephone numbers, - and dates. (Passes also available as library passes.) |
|
- EnglishLexicon |
-
- Analyzer with a built-in English lexicon of - 180,000 words. Lexical entries are coded with part of speech information. - Lexicon - is stored in the knowledge base in the dict subhierarchy. |
|
- HTML |
-
- Analyzer with a sequence of passes to recognize - HTML formatting elements, text tagging, special HTML characters, and tagging - structures. (Passes also available as library passes.) |
|
- XML |
-
- XML analyzer. (Passes also available as library - passes.) |
|
- XML DTD |
-
- Analyzer with a sequence of passes to recognize - an XML document type definition (DTD) file. (Passes - also available as library passes.) |
- - -
|
- Note: - Passes in the Database, Date Plus Numerics, HTML, XML and XML DTD templates - are also available as Library Passes. For - example, you can create an analyzer with the Bare template and choose - to add the sequence of passes from the Add > Library Pass menu in the - Ana Tab. For - general information on library passes, see Library - Passes. To - learn how to add these passes as library passes, see Adding - Library Passes. |
You set the type of analyzer you want to - build when you create a new analyzer.
- -For analyzer templates that contain a sequence - of passes, note that the relative ordering of passes in the sequence should - not be changed. If - the sequence of passes is changed, the analyzer may not work as designed.
- -NLP++ code in the CHECK Region applies - after the rule matcher has succeeded in matching a rule. These represent - the final opportunity to reject the rule match based on inconsistencies - spanning one or more rule elements. For example, before accepting a noun-phrase - rule, we could check for agreement between the determiner and noun (e.g., - accept "this company" but reject "these company").
- -Code in the CHECK Region precedes - the execution of element actions (e.g., the recurse action by which an element invokes a minipass). - Thus, the rule match can still be rejected before any side effects have - been executed.
- -The special predefined function fail() - immediately terminates execution of code in the CHECK Region and flags - that the rule match has failed. The analogous function succeed() also terminates CHECK code immediately, - but flags success and goes on to execute the element actions and code - in the POST Region.
- -The Code Zone may optionally contain a single CODE Region, which begins - with the @CODE marker and optionally terminates with the @@CODE marker.
- -NLP++ code in the CODE Region is executed prior to any rule matching - for the current pass.
- -The CODE Region may, in addition to NLP++ code syntax, incorporate CODE - Actions, i.e., specialized functions that are constrained to the CODE - Region.
- -The exitpass() function is useful - for conditionally and immediately terminating the current pass, without - executing any rules.
- -- - - - diff --git a/Help/helps/DECL.htm b/Help/helps/DECL.htm deleted file mode 100644 index 13cfdbf..0000000 --- a/Help/helps/DECL.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - -
The DECL Region is where you define your own functions in NLP++. It - is delimited by @DECL and optionally by @@DECL. When - present, it must be the first region in a pass file.
- -With VisualText 1.2 and later, functions can take parameters with the - L local variable, - as well as return values and call themselves recursively. In - addition, you may use the special NLP++ variable references to pass information - to and from functions. Depending - on where a function is called from, it can appropriately handle the S, N, - and X variable - references in addition to the global, or G, - variable reference. The - return type of functions can vary dynamically -- in fact, the same function - could return different types at different times. Multi-valued - variables (i.e., arrays) can be used to have a function return multiple - values.
- -Recursive functions work as expected. Also, - you may call a function in an earlier pass than the pass in which it is - defined (i.e., forward reference is ok). NLP++ - functions have syntax similar to C/C++ functions.
- -<function definition> ::= <id> \( <local vars> \)
- \{
- <statements> \}
-<local vars> ::= <local vars> \, <local var> |
- <local var> |
- (empty)
-<local var> ::= 'L' \( <string> \)
-<statement> ::= <return statement>
-<return statement> ::= 'return' <expr> \; |
- 'return'
- \;
An example follows.
- -@DECL
-
-myfunction(L("var")) # Define your
- function.
-{
-"output.txt" << "Entering
- myfunction." << "\n";
-G("tmp") = L("var");
- #
- Assign value to global variable.
-L("tmp") = L("var");
- #
- Assign value to local variable.
-return L("tmp") * 2; # Return a value.
-}
@CODE
- -"output.txt" <<
- myfunction(3) << "\n";
- #
- Call your function.
-
-@@CODE
This function call returns and outputs the number "6" to the - file "output.txt".
- -The Declare Zone consists of a single region, the Declare Region (or - Decl Region), in which you can define your own NLP++ functions.
- -Analyzers can run inside VisualText, as standalone - programs, or embedded within other programs. See - the Compiled - and Standalone Analyzers topic for technical details.
- -Analyzers built with VisualText are now readily - available. See - the Apps tab of our website above for TAIParse, - our advanced analyzer for general English text. TAIParse - currently performs accurate part-of-speech tagging (93+% in internal blind - tests) and also supports chunking, parsing, and semantic analysis of text. - Passes - that use HTML and/or strip it out are available and can easily be extended.
- -A Resume Analyzer - prototype at about 80% accuracy (internal blind testing) is also available - on the web site. TAI - has constructed numerous other analyzers that will be made available periodically - at the Apps tab.
- -A bridge enabling .NET - programs to call analyzers is also available. See - the VisualText\apps\DotNetTest and DotNetWeb folders in the product installation - for sample deployments. These - use the libraries DotNetAPI and DotNetBridge, both in VisualText\bin.
- -VisualText now supports analyzers that process - Unicode, addressing all the world's - languages (and mixed-language texts).
- -A Java - bridge is not part of the release, but examples of Java programs calling - C++ libraries are readily available on the Web. If - you need help with that, please contact us.
- -A Gnu/C++/Linux version of the VisualText - runtime libraries, enabling analyzers to run on Linux - platforms, is available.
- -Questions? Contact - us at support@textanalysis.com, 1-949-376-8507. Business - line at 1-877-235-6259.
- -- - - - diff --git a/Help/helps/Dialog_boxes/Pass_Properties_Dialog.htm b/Help/helps/Dialog_boxes/Pass_Properties_Dialog.htm deleted file mode 100644 index edbaaa9..0000000 --- a/Help/helps/Dialog_boxes/Pass_Properties_Dialog.htm +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - -
The Pass Properties Dialog is used to specify what kind of pass you - would like to create in the analyzer sequence. This - dialog is also used to provide a name for the pass and to control whether - the pass is active or skipped over during the analysis process.
- -The Pass Properties dialog is launched automatically when you add a - new pass to the analyzer sequence. You - can also access the Pass Properties dialog by selecting an existing pass - in the Ana Tab, right-clicking and selecting Properties.
- -
|
- Item |
-
- Description |
|
- Name |
-
- Name of the pass file associated with the - pass in the analyzer sequence. |
|
- Type |
-
- Type of algorithm for the pass. Type can either - be Pattern (for PAT algorithm) or Recursive (for REC algorithm) |
|
- Active |
-
- By default, a pass is active indicating that - it will not be skipped in the analyzer sequence. Unselecting Active will - cause the pass to be skipped during analysis. See Inactivating - Passes. |
|
- To End |
-
- Makes passes after the current pass either - active or inactive. |
|
- All |
-
- Makes all passes either active or inactive. |
|
- From X to - X |
-
- Specifies a range of passes to make active - or inactive. |
|
- OK |
-
- Confirms changes to the Pass Properties dialog. |
|
- Cancel |
-
- Closes the Pass Properties dialog. |
- - - - diff --git a/Help/helps/Dialog_boxes/archive_analyzer_dialog.gif b/Help/helps/Dialog_boxes/archive_analyzer_dialog.gif deleted file mode 100644 index 76a33a3..0000000 Binary files a/Help/helps/Dialog_boxes/archive_analyzer_dialog.gif and /dev/null differ diff --git a/Help/helps/Dialog_boxes/pass_properties_dialog.gif b/Help/helps/Dialog_boxes/pass_properties_dialog.gif deleted file mode 100644 index 816b06d..0000000 Binary files a/Help/helps/Dialog_boxes/pass_properties_dialog.gif and /dev/null differ diff --git a/Help/helps/DictTok_Sample.htm b/Help/helps/DictTok_Sample.htm deleted file mode 100644 index 4b8e1b4..0000000 --- a/Help/helps/DictTok_Sample.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - -
[All - sample analyzers are in Program Files\TexAI\VisualText\apps.]
- -Shows how to install and use the new DICTTOK analyzer pass.
- -Basically you just edit the analyzer.seq file for your project by changing - "tokenize" to "dicttok".
- -Then you need to make a knowledge base with POS information. Or - swap in the KB files from the TAIPARSE\BIN folder to the BIN folder of - your analyzer project.
- -WARNING: We - assume you are using an empty or "don't care" knowledge base - that comes with the analyzer project by default. If - you've built your own KB, you can rebuild it starting with the TAIParse - knowledge base. TAI - support can help you start building your own KBs, just send us an email - at support@textanalysis.com .
- -- -
- - - - diff --git a/Help/helps/DotNetTest.htm b/Help/helps/DotNetTest.htm deleted file mode 100644 index 0baa3f2..0000000 --- a/Help/helps/DotNetTest.htm +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - -
The DotNetTest analyzer is available in the VisualText release at VisualText/apps/DotNetTest. - This shows - how to use our DotNetAPI and DotNetBridge libraries in order to call a - VisualText analyzer from a .NET - program.
- -- - - - diff --git a/Help/helps/Find_Window.htm b/Help/helps/Find_Window.htm deleted file mode 100644 index 8633577..0000000 --- a/Help/helps/Find_Window.htm +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - -
The Find Window displays search - results when a search is performed over multiple files. Clicking on a - line in the Find Window displays the file where the search target was - found in the Workspace.
- -
Searches can be initiated by selecting
- Find in Files from the Edit Menu
- or by clicking on the Find in
- Files button
on
- the Main Toolbar.
Either action launches the Find in Files dialog box which - contains a number of search control parameters.
- - - - diff --git a/Help/helps/Functions/Miscellaneous_Functions/fail.htm b/Help/helps/Functions/Miscellaneous_Functions/fail.htm deleted file mode 100644 index 2be2961..0000000 --- a/Help/helps/Functions/Miscellaneous_Functions/fail.htm +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - -In CHECK Region, abort the rule that has just matched. Noop elsewhere.
- -fail()
- -Constrained to appear directly in the CHECK region, not within functions - defined in the DECL region.
- -Described both here and in Special Functions.
- -or, - succeed, Special - Functions, CHECK - Actions
- -- - - - diff --git a/Help/helps/Functions/Regions_and_Rule_Actions/Pre_Actions/debug.htm b/Help/helps/Functions/Regions_and_Rule_Actions/Pre_Actions/debug.htm deleted file mode 100644 index a87056f..0000000 --- a/Help/helps/Functions/Regions_and_Rule_Actions/Pre_Actions/debug.htm +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - -
Pre action that succeeds unconditionally. Used to place a C++ breakpoint - at a particular rule.
- -<fromRuleEltNumber,toRuleEltNumber>debug;
- -fromRuleEltNumber - type: int
-toRuleEltNumber - type: int
debug can appear in the PRE, CHECK and POST regions.
- -@PRE
-<1,1> debug();
@RULES
- -_xNIL <- _xALPHA @@
- -Special Functions, - PRE - Actions
- -- -
- - - - diff --git a/Help/helps/G.htm b/Help/helps/G.htm deleted file mode 100644 index 53895f3..0000000 --- a/Help/helps/G.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - -
Reference to a global variable. See - Variables.
- - - - diff --git a/Help/helps/GenTxt.htm b/Help/helps/GenTxt.htm deleted file mode 100644 index 6e43b02..0000000 --- a/Help/helps/GenTxt.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - -NOTE: - GenTxt is no longer supported and is unavailable for download. It - is superseded by TAIParse, a general English analyzer available at
- -http://www.textanalysis.com/Apps/POS_Tagger/pos_tagger.html
- -An older version that includes a semantic framework (yet to be incorporated - into the above) is available at
- -http://www.textanalysis.com/Apps/Natural_Language_Processing/natural_language_processing.html
- -A knowledge base that embeds WordNet is also available from TAI.
- -- - - - diff --git a/Help/helps/Getting_Help/Customer_Support.htm b/Help/helps/Getting_Help/Customer_Support.htm deleted file mode 100644 index ab714b3..0000000 --- a/Help/helps/Getting_Help/Customer_Support.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - -
TAI provides pre-built analyzers and knowledge bases to help jump start - your analyzer development project. For example, we provide a generic analyzer - called TAIParse that can be used as a starting point for many analyzers, - in both restricted and broad domains. TAIParse - incorporates and utilizes a large knowledge base with dictionary information. - A knowledge - base that embeds WordNet is available on request, as well.
- -We also offer training and professional services to accelerate the development - of your analyzer.
- -For more information about pre-built analyzers and other assistance - from Text Analysis International, please contact our customer support - line at 408-746-9932. You - may also contact us via email at info@textanalysis.com.
- -- -
- - - - diff --git a/Help/helps/Getting_Help/Tours_and_Tutorials.htm b/Help/helps/Getting_Help/Tours_and_Tutorials.htm deleted file mode 100644 index e4ff0b0..0000000 --- a/Help/helps/Getting_Help/Tours_and_Tutorials.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - -
We have provided - several tours and tutorials to help you get started with VisualText.
- -There are two - tours: the - VisualText Quick Tour and the - Corporate Analyzer tour. The - Quick Tour introduces you to the major components of VisualText. The Corporate - Analyzer walks you through the analyzer-building process. We - suggest you take the VisualText - Quick Tour, study the tutorials, and then continue with the Corporate - Analyzer tour.
- -Exercises in - the form of tutorials have been provided to help you learn VisualText. - The tutorials - in the Tutorials section give you a chance to create an analyzer using - VisualText. A brief description of the tutorials and sample code is provided - in the Tutorial - Introduction. Various features and functions are explained as you - go, with no attempt to be systematic about the meaning of all the menus, - buttons and rules.
- - - - diff --git a/Help/helps/Getting_Help/VisualText_Help.htm b/Help/helps/Getting_Help/VisualText_Help.htm deleted file mode 100644 index b370368..0000000 --- a/Help/helps/Getting_Help/VisualText_Help.htm +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - -The present Help documentation can be accessed by selecting VisualText™ Help from the Help Menu.
- -The Help documentation is also available as a stand-alone application, - from the Windows Start button > Programs > VisualText > Help. - The executable is located by default in the installation directory:
- -C:\Program Files\TextAI\VisualText\Help\Help.chm
- -The VisualText Help documentation is built using RoboHelp®, which is - layered on top of HTML Help. The - Help system appears in a separate Help Viewer window and is used to navigate - the help topics. The - Help Viewer tabs include: Contents, - Index, Search, - and Glossary. Each - of these tabs is described below:
- -Contents: The - Contents tab displays the sections and pages of the Help System. To - view the contents of a section or page, click on the item and the related - topic is displayed in the Help Viewer. The - major divisions are:
- -Text Analysis International: About Text Analysis International
Introduction: - Brief introduction to VisualText
Getting Help: - Introduction to Help
Getting Started: - Installation procedures and Programming Notes
VisualText Basics: - Overview of the components of VisualText
VisualText Interface: - Detailed description of the VisualText interface
Using VisualText: - Step-by-step instructions for using VisualText
NLP++: Detailed - description of the NLP++™ programming language
Tutorials: Tutorials - that go through the basics of using VisualText
Sample Analyzers: Step-by-step explanation - of working analyzers
Index: The - Index tab contains a list of keywords and subkeywords that are linked - to topics in the Help system. To - view topics linked to index items, click on the keyword and select Display. You can also hit the return - key and the related topic will appear in the Help Viewer. When - more than one topic is linked to a keyword, a Topics - Found dialog opens. From - the list of topics, you can select the topic you want to view.
- -Search: The - Search tab allows you to search for instances of specified words in the - Help system. When a word is found, the topics containing the word are - listed. To - view the results, select the topic from the list and click Display.
- -Glossary: The - Glossary tab displays an alphabetical listing of technical terms related - to VisualText. Definitions - for selected terms are displayed in the lower pane of the Glossary Tab.
- -See Also Links: - In addition - to navigating the Help topics using the four Help Viewer tabs, you can - also get to topics through See Also - links provided on individual topics. The - See Also links refer to topics relevant to the current topic or to topics - that can provide other cross-reference information.
Context-Sensitive - Help: Context-Sensitive - Help allows you to get information about toolbar icons. To - learn about a toolbar icon, select Help - > Context Help and click on - the toolbar icon. The - Help Viewer will pop up and display the relevant topic.
F1 Help: - F1 Help - allows you to get help for NLP++ terms. F1 - Help can be accessed by selecting an NLP++ term in a pass or text file - and hitting the F1 key on the keyboard. Help - topics will also be launched for an unselected word under the cursor.
Right-Click Menus: - Many of - the VisualText right-click menus provide access to the Help documentation. - The right-click menu for pass files in particular allows you to get to - descriptions of NLP++ code. To - access documentation for NLP++ functions and other names, highlight the - text in the pass file and select Help - on Selection from the right-click menu.
Please send suggestions about our Help documentation to help@textanalysis.com. - This address - is for documentation issues only. For - technical questions or comments, please send email to support@textanalysis.com.
- - -|
- Note: - To see product information and version - number, select Help > About - VisualText. |
- - - - diff --git a/Help/helps/Getting_Started/Caveats_and_Limitations.htm b/Help/helps/Getting_Started/Caveats_and_Limitations.htm deleted file mode 100644 index 36496f7..0000000 --- a/Help/helps/Getting_Started/Caveats_and_Limitations.htm +++ /dev/null @@ -1,1030 +0,0 @@ - - - - - - - - - - - - -
This document details issues with
-VisualText™ and NLP++™. Additional information about the current release can be
-found in the New in Current Version
-page and in the Release Report, located by default at
C:\Program
-Files\TextAI\VisualText\Docs\ReleaseReport.txt.
·
-Zipped
-tutorial analyzers may be missing in some versions, so you'll have to start
-working them from Tutorial number 1.
·
-Documentation
-for Linux is not provided in the present Help. Workaround:
-contact our customer support for assistance.
·
-On
-rare occasions, the installation program may hang. Please try another computer, and contact our
-customer support for workarounds.
·
-Analyzers
-cannot be run on files with the .log extension.
·
-VisualText
-is optimized for processing large numbers of relatively small text files. Input
-files larger than 1MB may substantially
-slow processing, and it is inadvisable to process individual files larger than 4 MB. Workaround:
-a program may split large texts into buffers and submit them to an analyzer one
-at a time, using the knowledge base to manage information across segments of a
-document.
·
-Scale
-Up issues. A variety
-of scale-up issues have been addressed in VisualText 2.x. If you are experiencing problems, contact us.
·
-Knowledge
-base DLL file. For
-huge knowledge bases, the KB.DLL compiled knowledge base can become extremely
-large (100s of MB). VisualText
-QDBM addresses this, but is too slow for commercial-grade use at this time.
·
-It
-is safest to edit the gram subhierarchy using the Gram Tab only, rather
-than the KB Editor. Where feasible, use the Gram Concept Properties dialog
-(available from Gram Tab popup > Properties) to edit attributes of gram
-concepts. Use the Attribute Editor only to edit attributes that are not
-accessible from the Gram Concept Properties dialog.
·
-Editing
-the sys hierarchy can easily corrupt the Knowledge Base. Before
-editing the sys hierarchy (either manually or programmatically), you are
-advised to create a backup copy of your project. A
-KB Safe Mode is provided in the VisualText preferences for those who want to
-disable inadvertent manual editing of the sys hierarchy.
·
-Size
-Dynamically in VisualText display preferences is currently working for the KB
-Editor window only.
·
-Currently,
-folders are not part of the Ana Tab. Descriptions for Ana Tab folders in the
-Ana Tab Popup Menu are for future enhancements.
·
-NLP++
-is an evolving language. If
-constructs that you would like to see in the language are absent, you may often
-create them yourself by writing a user-defined NLP++ function or a C++ version
-within the User Project for an analyzer. We
-appreciate your feedback about capabilities to incorporate in the language,
-both to provide you with faster execution of the functions and to enhance NLP++
-and VisualText as a development environment.
·
-One
-way to implement a new type of pass algorithm is to define a new NLP++ function
-in the user project and invoke that function from the code region of a
-pass. The user function may traverse the parse tree, interface to third party
-code, and so on. (Now
-the same can be done with an NLP++ function defined in a @DECL region).
·
-Some
-data types are not yet implemented, including bool, and char.
-Nonzero integer values are used for Boolean true and zero is used for
-Boolean false, analogous to the C Programming Language. We
-recommend NOT explicitly comparing the returns of functions documented as bool
-with 1 and 0. For
-example, write if (batchstart()) rather than if (batchstart() == 1).
·
-Numeric
-overflow and underflow are not flagged. For
-example, the maximum int is 2147483647 in Windows and must be checked by
-the programmer as needed. For
-large numbers, the float type should be used.
·
-POST
-Actions should operate on rule elements from right to left (or bottom to top,
-if written one element per line).
When the POST
-region includes group and excise actions, the numbering of rule elements is
-affected. For example, if element 3 is to be excised, then referring to
-elements 4, 5, etc. subsequently is invalid. Therefore, operations on rule
-elements should proceed from right to left, that is from high-numbered rule
-elements to lower-numbered elements. For example, the following POST actions
-will work as expected:
N("status",4)
-= "good";
-excise(2,3);
The node matching
-element 4 gets a variable named "status" with value "good",
-after which the nodes matching elements 2 and 3 are excised. But if written
-this way:
excise(2,3);
-N("status",4) = "good";
there may no
-longer be an element 4 after the excise action, or a different rule element may
-be referred to than expected. Conditionally excising rule elements would
-further complicate the tracking of rule element numbers.
·
-Stacking
-POST Actions should be avoided.
While group actions
-may be repeated in a POST Region (but see below), the user should avoid
-writing multiple actions (e.g., single, excise, singler, singlex) that modify
-the parse tree within a single POST Region. After an action such as single,
-the elements of the current rule may no longer available.
·
-GROUP
-action differs in compiled versus interpreted versions of an analyzer
-
-In interpreted NLP++, a group action such as group(5,7,"_list")
-collapses elements 5 through 7 under a new node called _list, which is numbered
-5, with the subsequent element (which was numbered 8) now numbered as 6. But
-in compiled code, 5 through 7 are collapsed as before, but now elements 6 and 7
-are retained with zero nodes, and numbering is unchanged. That
-is, element 8 is still number 8. This
-discrepancy will be fixed in a subsequent version.
·
-Some
-NLP++ actions will not accept general NLP++ expressions as arguments. For
-example, singler(1,3) is valid, but
-singler(G("lo"),G("hi")) will result in a syntax error.
·
-Partly
-constrained wildcards don’t work in some cases.
-The following example
@PRE
-<2,2> var(“lower”);
-@RULES
-_NP <-
- _The
- _xWILD [plus]
- _Bears
- @@
will match nodes to
-the wildcard regardless of whether they have a nonzero variable called “lower”. A workaround is to write the rule as
@PRE
-<2,2> var(“lower”);
-@RULES
-_NP <-
- _The
- _xWILD [plus fail=(_Bears)]
- _Bears
- @@
This will work as
-specified. Only nodes with a nonzero variable called “lower” will match the
-_xWILD element.
·
-Infinite
-loops. As in
-most grammar systems, it is possible to write "grammar loops" in
-NLP++. Also, a
-lone rule such as
@POST
singler(1,1);
@RULES
_np <- noun [opt]
-prep [lookahead] @@
where everything is
-optional except the lookahead elements, can cause an infinite loop.
·
-Modifying
-the lookahead region. Reducing or
-grouping a node at or past the [lookahead] keyword can cause a pass to silently
-stop matching rules, as below:
@POST
single(); #
-Correct would be singler(1,4);
@RULES
_np <- _det _quan
-_adj _noun _prep [lookahead] @@
·
-In
-recursive analyzer passes, an infinite loop occurs with rules having one
-right-hand-side element with singlet mode:
_adjlist <-
-_adj [s] @@
Here,
-_adj is found "inside" repeatedly. Two
-ways to fix this are shown below.
_adjlist [base] <- _adj [s] @@
_adjlist <- _adj @@
In
-the first, case, _adj is found "inside" the current parse tree node only
-once, since the base attribute placed
-on the _adjlist keeps the internal _adj from being found inside it. In
-the second case, _adj only matches when it labels the current "top
-level" parse tree node being examined. Once
-it is reduced to _adjlist, the internal _adj is no longer visible.
·
-KB
-Phrase. A
-knowledge base PHRASE is implemented merely as the first element in the phrase.
- Thus, fetching
-the phrase and then adding a new first element requires re-fetching the phrase.
G("phrase")
-= findphrase(G("some concept")); #
-Fetch the "phrase", i.e., the first node.
addnode(G("phrase"),"nodename",
-1); #
-Add a new first node of phrase.
In the above,
-G("phrase") no longer points to the first node in the phrase. A
-workaround is to track the first node in a phrase, or to re-fetch the phrase as
-needed using findphrase, as below
G("phrase")
-= findphrase(G("some concept")); #
-Fetch the "phrase", i.e., the first node.
addnode(G("phrase"),"nodename",
-1); #
-Add a new first node of phrase.
G("phrase")
-= findphrase(G("some concept")); #
-Re-fetch the first node of phrase.
VisualText can be downloaded over the internet. In order to do this, - contact Text - Analysis International, Inc. for the appropriate password and file - name.
- -In most cases, you will download VisualText directly from the Text Analysis - International website, at
- -http://www.textanalysis.com
- -You will be asked to type in your user name (usually your email address) - and a password supplied when you purchased the product. You - will then select the download file and browse to a location on your machine - for downloading the file. Remember - where you placed the downloaded file, as you will need to run it (e.g., - by double-clicking on it) in order to install the product on you machine. - Follow - the instructions in the popup screens of the installation program.
- -Some materials (e.g., sample tutorials) will be installed in the form - of compressed .zip files. If you do not have decompression software to - access these files, you can download WinZip from http://www.zdnet.com/downloads.
- -In some cases, you may be given a password and instructions for downloading - material from Text Analysis International via an FTP address.
- -Before starting the installation process, make sure the information - on your computer is backed up.
- - -|
- Note: - If you already have a version of VisualText on your computer, you must - first remove the older version before you can install the newer one, as - described below. Once you have done this, restart the install program - to install the newer version. |
Start the installation process by double clicking on the VisualText - program icon in the directory where you downloaded the VisualText software. - This will launch the VisualText InstallShield Wizard.
- -To Remove a Previous Installation of - VisualText:
- -Click on the Windows Start - button at the bottom left of your screen.
Select Settings - and within that select Control Panel. - The Control Panel window opens.
In the Control Panel window, double-click the - icon labeled Add/Remove Programs.
Scroll to find VisualText and double-click that - entry. The VisualText InstallShield Wizard appears.
Select 'Remove' - from the Welcome dialog box, if not already selected. Then click on Next.
On the Confirm File Deletion dialog, click OK to completely remove the application - and all the components.
Select 'Finish' - and continue with the install as directed below.
Old beta versions of VisualText employed a file - called C:\autoexec.bat . If - you installed such a beta, you may should check that this file is cleaned - of VisualText-specific definitions. Right-click - on the autoexec.bat file and select Edit to modify the file.
|
- Note: - It is not necessary nor will you be prompted to reboot your machine after - an earlier version of the software has been removed. |
To Install VisualText:
- -Double-click the installation program icon again - to start the installation process.
Before starting the installation procedure, make - sure to close all open programs.
Double-click the install program and follow the - prompts from the InstallShield Wizard Welcome dialog.
Click Yes - to confirm the license agreement.
On the Customer Information dialog, supply your - name and company name. Leave serial number as is.
Select a destination folder - for the installation. The - default is C:\Program Files\TextAI.
For Setup Type, select typical.
In the Select Program Folder, select VisualText - for Program Folders and Administrative Tools for Existing Folders.
On the Start Copying Files dialog, select Next. (The InstallShield Wizard will - finish the installation.)
If present, select "Yes, - restart my computer now" on the Reboot dialog. (Make sure - to close all open applications before rebooting.)
- -
If you are installing VisualText and there was an older version on your - machine, make sure that any shortcuts you've created point to the right - one. Also, note that any subdirectories and files you may have created - under the VisualText path will not be removed when you remove an existing - installation. Therefore, you may wish to move or delete those old files. - In addition, you can delete the compressed .zip download file to save - space.
- -Programs, libraries, help files, and the like - are installed at the program location, which defaults to
C:\Program Files\TextAI\VisualText\
- -Note: This default location is the assumed - installation location in the tutorials - and discussions in this documentation.
- -For user-built analyzers - (as in the tutorials) the default working directory is:
C:\apps
- -The VisualText executable is VisualText.exe - and is located in
C:\Program Files\TextAI\VisualText\bin\VisualText.exe.
- -The VisualText™ - Help file is Help.chm and - is located in
C:\Program Files\TextAI\VisualText\Help\Help.chm.
- -The tutorial - analyzers, which can be used in tandem with the Help, are in zip - files located in
C:\Program Files\TextAI\VisualText\docs
- -The VisualText installation program creates a program folder containing - the VisualText icon, Help documentation, and Release Notes in the Start - menu under Programs > VisualText.
- -A Release Report containing known issues and notes - on features can be found in a file called ReleaseNotes.txt in the docs - folder:
- -C:\Program Files\TextAI\VisualText\docs\ReleaseNotes.txt
- -To see a related list in the Help, refer to Programming - Notes and Issues.
- -- - - - diff --git a/Help/helps/Gram_Tab_Popup.htm b/Help/helps/Gram_Tab_Popup.htm deleted file mode 100644 index e5e79c6..0000000 --- a/Help/helps/Gram_Tab_Popup.htm +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - - - - - -
The Gram Tab Popup menu is launched by right clicking in the Gram Tab - Window.
- -
The Gram Tab is used to construct a concept (or sample) hierarchy and - to sample data from input files to the concept hierarchy.
- - -|
- Menu Item |
-
- Description |
| - | -
- Submenu for adding concepts to the sample - hierarchy. (See below.) |
|
- Delete |
-
- Deletes selected concept - from the sample hierarchy. |
|
- Delete Children |
-
- Deletes the children - of a selected concept but keeps the concept itself. |
|
- Find |
-
- Finds selected concept across multiple files. - Results are displayed in the Find Window. |
|
- Delete Samples |
-
- Deletes the sample concepts - associated with a rule concept or label concept. |
| - | -
- Submenu for importing and exporting sample - files. (See below.) |
|
- Attributes |
-
- Launches the Attribute - Editor dialog and displays the attributes belonging to the selected - item. User has option to delete, add or change names of attributes and - values. |
|
- Highlight - Matches |
-
- Highlights words or phrases in a text file - matching selected concept in the sample hierarchy. |
| - | -
- Manually sets an attribute called Dirty on - a concept so that Generate - Dirty will apply to that concept and its descendants. |
|
- Pass File |
-
- Displays content of the pass file associated - with selected concept. Same effect as double clicking the concept. |
|
- Properties |
-
- Displays Gram - Concept Properties dialog showing rule generation properties for selected - concept in the sample hierarchy. When an attribute is set for a particular - concept, the attribute is inherited by all the descendants of the concept - given the attribute. For example, when the Dirty attribute is set for - a folder concept, all concepts under the folder concept inherit the Dirty - attribute. |
|
- View Parse - Tree |
-
- Displays the parse tree of the currently selected - text in the Workspace. Same effect as selecting Display - Entire Tree from the Parse - Tree Menu and View - Parse Tree button from the Debug Tool. |
| - | -
- Submenu for archiving the sample hierarchy. - (See below.) |
|
- Help |
-
- Launches VisualText Help documentation. |

|
- Menu Item |
-
- Description |
|
- Stub |
-
- Adds a stub at the top (i.e., leftmost) level - of the sample hierarchy. A stub concept is associated with a region of - automatically generated passes in the analyzer sequence. |
|
- Folder |
-
- Adds a folder concept to the current stub - concept or folder concept. Folders are used to help organize the sample - hierarchy. |
|
- Rule |
-
- Adds a rule concept to the current folder - concept or stub concept. |
|
- Label |
-
- Adds a label concept to current rule concept. - Labels are used to organize subsamples of a given sample. |

|
- Menu Item |
-
- Description |
|
- Export |
-
- Creates a file containing all the samples - of the currently selected rule concept. Samples are added one per line. |
|
- Import |
-
- Reads a file containing samples into the currently - selected rule concept. Each line in the file should contain only one sample - text. |
- -
Gram Archive is used to view - and create archives of the Gram Hierarchy either on remote servers or - on local machines. Archiving - is used to create quick backups of your work and to facilitate communication - between developers working on the same analyzers. To - set archiving preferences, select Preferences - under the File Menu and click on the Archiving - tab.
- -
|
- Menu Item |
-
- Description |
|
- Archive Local |
-
- Launches a dialog box to create a local archive - of the current sample hierarchy, including rule concepts and samples. - The name of the archive file defaults to the name of the current analyzer - suffixed with the current date and time. |
|
- Archive Remote |
-
- Launches a dialog box to create a remote archive - of the current sample hierarchy, including rule concepts and samples. - The name of the archive file defaults to the name of the current analyzer - suffixed with the current date and time. Archive - is created on the remote server. |
|
- View Local |
-
- Displays local archives in the Gram Archive - > View Local dialog. Presents options to delete, rename, upload (send - to server) or load into current analyzer Workspace. Listings - in the archive can be sorted by clicking on column headers. |
|
- View Remote |
-
- Displays server archives in the Gram Archive - > View Remote dialog. Presents options to delete, rename, download - (send to local archive) or load into current analyzer Workspace. Listings - in the archive can be sorted by clicking on column headers. |
- - - - diff --git a/Help/helps/Help.brs b/Help/helps/Help.brs deleted file mode 100644 index 8b13789..0000000 --- a/Help/helps/Help.brs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Help/helps/Help.glo b/Help/helps/Help.glo deleted file mode 100644 index b92b466..0000000 --- a/Help/helps/Help.glo +++ /dev/null @@ -1,344 +0,0 @@ -NAME=.ana file -Analyzer project definition file. Used by the VisualText GUI to load an analyzer. -NAME=.pat file -A file associated with a user pass in the analyzer sequence which holds NLP++ rules and code. -NAME=action -An NLP++ function specialized for a particular region in a pass file. For example, the single action only works in the @POST region, after a rule has matched. -NAME=action region -A region related to rule matching. Includes the @PRE, @CHECK, and @POST regions. -NAME=algorithm -In general programming, a method or procedure for accomplishing a task. In VisualText, sometimes short for a pass algorithm. -NAME=Ana Tab -The part of the VisualText interface in which you control the text analyzer sequence, passes and pass files. -NAME=analyzer -A text analyzer, i.e., a program that takes text as input and processes it in some way. Text analyzers typically transform, critique, or extract information from text. -NAME=analyzer project -The full set of folders and files associated with a text analyzer. Includes files that define the analyzer, input files, and other data files used by the analyzer. -NAME=analyzer project file -The file that is used by the VisualText GUI to load an analyzer. Also called a .ana file. -NAME=ASCII Table -A table that displays the decimal and hexadecimal numbers and their corresponding ASCII characters. -NAME=attr -(1) Abbreviation for attribute. (2) a rule element modifier. -NAME=attribute -A knowledge base object attached to a concept and representing a property of the concept. Consists of a key (or name) and one or more values. A concept may have multiple attributes. -NAME=Attribute Editor -A VisualText tool that allows you to change, add and edit the attributes and/or values of a concept (or node) in the knowledge base. -NAME=backup aware -Refers to rule elements that don't overrun an adjacent rule element. Only an _xWILD with no lists (match, fail, except) is "backup aware". -NAME=Bare -Refers to the absolute basic or minimal analyzer. The Bare template comes with the system passes tokenize and lines. -NAME=batch -Refers to running a group of input files non-interactively. -NAME=Bison -Gnu freeware for writing grammars with associated code. Similar to YACC (Yet Another Compiler Compiler). -NAME=blank space -A single whitespace character. -NAME=bleeding -When a matched rule keeps another rule from matching. -NAME=C file -A C Programming Language code file. -NAME=CG -Abbreviation for Conceptual Grammar. -NAME=Character Viewer -a VisualText tool that shows a count of characters in a line of text and the ASCII characters for each line of text. -NAME=CHECK Action -A function restricted to operate in the @CHECK region, i.e., after a rule's right-hand-side phrase has matched. -NAME=CHECK Region -An action region of a pass file. NLP++ code in this region apply after the matcher has succeeded in matching a rule. -NAME=child concept -A concept that is the child of another concept. -NAME=CODE Action -A function that operates in the @CODE region. Some code actions are retained because they are still useful, but they may be overhauled in future VisualText releases. -NAME=CODE Region -The region delimited by @CODE and optionally @@CODE. Executes NLP++ code prior to any rule matching in the pass file. -NAME=Code Zone -The part of a pass file where NLP++ code that is independent of rule matching is written. -NAME=command file -A batch file containing commands that edit or add to the knowledge base. -NAME=concept -A knowledge base object. The VisualText knowledge base consists of a hierarchy of concepts. -NAME=Concept Oriented Programming -A method of programming that deals with the concepts underlying a task. -NAME=concept tree -A parse tree containing only nodes that have been built in the selected analyzer pass. -NAME=Conceptual Grammar -A knowledge representation framework consisting of concepts, attributes, and phrases combined into knowledge hierarchies and graphs -NAME=context node - -NAME=Context Zone -The part of a pass file where methods for selecting nodes of the parse tree are specified. -NAME=COP -Abbreviation for Concept Oriented Programming -NAME=DECL Region -Region for user-defined NLP++ functions; delimited by @DECL and (optionally) @@DECL. -NAME=dictionary concept -A concept in the dict hierarchy of the knowledge base. Also called word concept. -NAME=Dictionary Editor -A VisualText tool that allows you to make, add and edit a dictionary database. [Currently unavailable.] -NAME=dissolve -Remove a top-level node and more (or splice) its children to the top-level. -NAME=element action -An element modifier that specifies an action to be performed when the current rule has matched. For example, "rename=noun" specifies that the node matching the current element is to be renamed "noun." -NAME=element modifier -A keyword or keyword and value pair that affects the matching or follow-on actions of a rule element. For example, "plus" specifies that one or more nodes must match the current element. -NAME=escape -(1) to prefix a character with an escape character. (2) a character used as an escape character. -NAME=escape character -A character that indicates the succeeding characters should be taken literally rather than interpreted as a special character -NAME=except list -A list of elements that are exceptions to a match or fail list. For example, _xWILD [fail=( A B C ) except=( D )] will fail on A, B, or C except in the case that it also matches D. For example, could be used to fail on nouns except for humanNouns. -NAME=excise -Remove a sequence of nodes from a parse tree. -NAME=fail list -A list of elements that will cause a match to fail. For example, _xWILD [fail=( A B C )] will match nodes until it encounters one named A, B, or C. -NAME=feeding -When a rule match causes another rule to succeed. -NAME=file path - -NAME=folder concept -A concept to help organize related sets of samples in the Gram Tab. folder concepts contain other folder concepts and/or rule concepts. -NAME=Gram hierarchy -The hierarchy of concepts visible in the Gram Tab, and used to manage concepts for stubs, folders, rules, labels, and samples. -NAME=Gram Tab -The part of the VisualText interface in which you manage samples taken from input texts. -NAME=Grammar Region -The part of the pass file where rules and actions are written. -NAME=Grammar Zone -The part of a pass file where the main rules of the pass file are written. -NAME=Hex Viewer -Views text files as hexadecimal characters. -NAME=IDE -Abbreviation for integrated development environment. Refers to a user interface (GUI) program with tools that work in concert to support developers. -NAME=index concept - -NAME=integrated development environment -A user interface (GUI) program with tools that work in concert to support developers. -NAME=intermediate parse tree -A parse tree as modified by a selected pass in the Ana Tab. -NAME=internal node -A node that is not a leaf of the parse tree. See nonterminal node. -NAME=KB -Abbreviation for knowledge base -NAME=KB Editor -A VisualText tool that allows you to edit the knowledge base. -NAME=KB.DLL - -NAME=KBMS -Abbreviation for knowledge base management system -NAME=key-value pair - -NAME=keyword density - -NAME=knowledge base -(1) A hierarchical database. (2) A repository for concepts, relationships, and other knowledge, typically organized in a meaningful way. -NAME=knowledge base child concept - -NAME=knowledge base concept -A basic unit of knowledge in the Knowledge Base. -NAME=knowledge base management system -A software system for managing a knowledge base. Analogous to a database management system. -NAME=knowledge base node -A member of a list of nodes called a phrase. Each concept in the knowledge base may own one phrase. A node is very similar to a concept, except that it is not attached to the hierarchy. A node is often treated as an instance of a concept in the hierarchy. -NAME=label concept -A concept in the Gram Tab hierarchy that holds subsamples of larger samples. Label concepts can occur only under rule concepts. For example, a label concept called "AreaCode" might be placed under a rule concept named "PhoneNumer". -NAME=leaf -Same as leaf node. -NAME=leaf node -A token node of the parse tree. A leaf token has no children. Also called a terminal node. -NAME=leaf token -Same as leaf node. -NAME=lhs -(1) The lefthand side element of a rule, also called the suggested element. (2) The suggested node built for the lefthand side of a rule. -NAME=library pass -A prebuilt pass that may be copied into the current analyzer sequence. -NAME=list node -A parse tree node that collects a list of related nodes. -NAME=literal -A node or token that represents a literal string in the input text. -NAME=match list -A list of elements that must be matched. For example, _xWILD [match=( A B C )] will match nodes as long as they are named A, B, or C. -NAME=Minipass Zone -The part of a pass file where nested minipasses can be specified. -NAME=MULTI Selector -A selector used in the SELECT Region of a pass file which specifies a list of node names for the rule matcher. The whole subtree under the specified node is searched. -NAME=natural language engineering -Principled method for constructing NLP systems. -NAME=NLE -Abbreviation for natural language engineering -NAME=NLP -Abbreviation for natural language processing, a subfield of Artificial Intelligence concerned with human languages. -NAME=NLP++ -Proprietary programming language of Text Analysis International. A general programming language with specializations for natural language processing. -NAME=node -(1) A parse tree node. (2) A knowledge base node. -NAME=node variable -See parse tree node variable -NAME=NODES Selector -A selector used in the SELECT Region of a pass file which specifies a list of node names for the rule matcher. The phrase immediately under the specified node is searched. -NAME=nonliteral -A parse tree node that may represent more than one token. The name of a nonliteral always starts with an underscore character. -NAME=nonterminal node -A node that dominates another node in a parse tree. That is, it has children. -NAME=noop -A reduce action in the @POST region that does nothing. Used to override the default action of an empty @POST region. (When a @POST region is non-empty, noop becomes the default action.) -NAME=offset -A number that indicates character position of a node in text. -NAME=ontology -A hierarchy of concepts, typically used to categorize the world. -NAME=operator -Part of an NLP++ expression that performs a mathematical, logical, or other function. For example, "+" is an operator used to add two numbers or catenate two strings. -NAME=opt -Element modifier denoting an optional element. -NAME=optional -Element modifier denoting an optional rule element. -NAME=output action -An action that causes output to be written to a file. For example, ndump writes all the variables and values for a node out to a file. -NAME=parse -(1) To ascribe structure to a linear sequence of words or symbols according to the rules of a grammar. (2) To create a parse tree representing a text. (3) A parse tree or interpretation of a text. -NAME=parse tree -A data structure that tracks patterns matched in an input text. -NAME=parse tree node -A unit or data structure representing a piece of text or an idea that the text represents. Nodes are combined to form a parse tree. -NAME=parse tree node variable - -NAME=parser -A program that takes a text as input and produces a parse tree as output. -NAME=pass -A discrete step in the text analyzer with its own pass algorithm. -NAME=pass algorithm -The method to be executed for a pass in the analyzer. Examples are: tokenize, pattern, and recursive algorithms. -NAME=pass file -A file of NLP++ code and rules associated with a pass of the text analyzer. Pattern and Recursive pass algorithms make use of pass files. -NAME=pat algorithm -See Pattern algorithm. -NAME=PATH Selector -A selector used in the SELECT Region of a pass file which specifies a path of node names for the rule matcher. -NAME=Pattern algorithm -A pass algorithm that executes the rules in a pass file by traversing the parse tree once. -NAME=PNODE -Name for the parse tree node data type. -NAME=POST Action -An action that occurs in the @POST region. For example, single tells the rule matcher to build a new node for a matched rule. -NAME=POST Region -An action region of a pass file. NLP++ code in this region apply after a rule match has been accepted. -NAME=PRE Action -Action that occurs in the @PRE region. Further constrains the matching of a rule element. -NAME=PRE Region -An action region of a pass file. Actions in this region represent additional conditions on the matching of individual rule elements. -NAME=print action -An action that prints to a file. -NAME=rec algorithm -See Recursive algorithm. -NAME=recurse region -A named region that is marked by an initial @RECURSE and specifies a minipass within a pass file. The minipass is invoked by a recurse element modifier in a rule element, e.g., in the main Grammar Zone. -NAME=recursion -An algorithm whereby the same action is taken repeatedly until some condition or goal is achieved. -NAME=recursive algorithm -A pass algorithm that executes the rules in a pass file by traversing the parse tree multiple times, till no rules match. -NAME=recursive grammar -A set of rules that is executed repeatedly, till no rules match. -NAME=recursive pass -See Recursive algorithm. -NAME=reduce -(1) Place a sequence of one or more nodes under a new node. Often refers to placing the nodes that match the righthand side of a rule under a new node named with the lefthand side of a rule. (2) A reduce action. -NAME=reduce action -An action in the @POST region that builds a new node for a matched list of nodes. -NAME=reduction -A reduce action. -NAME=rewrite grammar -Same as recursive grammar. -NAME=RFA -Rule File Analyzer. A VisualText analyzer that reads the pass files for a text analyzer. A bootstrapping parser that reads a simplified dialect of NLP++. -NAME=RFB -Similar to the RFA, but parses the full NLP++ language. -NAME=rhs -(1) The righthand side phrase of a rule. (2) The nodes that matched the righthand side. -NAME=root -The top-level node of the parse tree. A node with no parent. -NAME=RUG -Abbreviation for the automated Rule Generation machinery. -NAME=rule -An NLP++ construct consisting of a phrase of elements and a suggested element. Actions for a matched rule are governed by preceding @PRE, @CHECK, and @POST regions, if present. -NAME=rule action -A specialized NLP++ function that knows about particular contexts. -NAME=rule concept -A Gram hierarchy concept that owns a set of related samples, from which the rule generator will generalize, merge, and generate rules. A rule concept may have label concepts under it and may own a set of samples. -NAME=rule element -A literal or nonliteral unit in the phrase of a rule. -NAME=rule file -Synonym for pass file. -NAME=rule matcher - -NAME=Rules File Analyzer -See RFA and RFB. -NAME=rules region -A region delimited by @RULES and optionally @@RULES, for holding NLP++ rules. -NAME=sample -A piece of a larger text, representing a discrete idea. For example, a "310-555-1212" is a sample telephone number. -NAME=sample concept -A concept that stores a single sample or subsample in the Gram Tab. Sample concepts are placed under rule concepts and label concepts. -NAME=sample hierarchy -Same as Gram hierarchy. -NAME=select region -A region optionally delimited by @SELECT and @@SELECT that specifies how context nodes are to be selected in the parse tree. -NAME=selector -A marker such as @NODES which specifies which nodes will be subjected to rule matching. -NAME=single-tier reduction -The standard reduce action in the @POST region. Specifies that a new node is to be built, with the matched phrase of nodes to be placed underneath the new node. -NAME=singlet -A phrase element modifier. -NAME=singlet chain - -NAME=spider -A program that automatically searches the World Wide Web and retrieves documents and links to those documents. -NAME=spidering -The process of searching the World Wide Web and automatically retrieving documents and links to those documents. -NAME=string - -NAME=structural description -Same as parse tree. -NAME=stub -A placeholder for a sequence of passes that will be generated automatically. -NAME=stub concept -A Gram Tab concept that is associated with a region of automatically generated passes in the analyzer sequence. -NAME=stub region -A sequence of automatically generated passes within the overall analyzer sequence. -NAME=subhierarchy - -NAME=subtree - -NAME=suggested element -A node to which matched elements of a rule are reduced. -NAME=suggested node - -NAME=system attribute -An attribute assigned by the system to a concept in the knowledge base. System attributes include algo, type, active, passnum etc. Altering system attributes of a concept is not recommended. -NAME=system pass -A pass in the analyzer sequence that is defined by the system not the user. The tokenize pass is an example of a system pass. -NAME=template -A starter or skeletal analyzer that can be copied and modified. -NAME=terminal node -A node that does not dominate another node in a parse tree. Also called a leaf node. -NAME=Text Tab -the part of the VisualText interface where you manage input and output files. -NAME=token -A node representing a literal text string. -NAME=tokenize -(1) Pass algorithm for converting an input text to an initial parse tree. (2) The default system and first pass in an analyzer sequence. -NAME=top-level node -A node being traversed by the rule matcher. -NAME=trigger -An element modifier that causes a rule to be matched by first matching the associated rule element. -NAME=uninterned - -NAME=variable -See node variable. -NAME=variable action -An action that operates on a node variable. -NAME=white space -also whitespace; any of space, tab, carriage return or newline -NAME=word concept -See dictionary concept. -NAME=YACC -Yet Another Compiler Compiler. See Bison. diff --git a/Help/helps/Help.hhc b/Help/helps/Help.hhc deleted file mode 100644 index d534ab9..0000000 --- a/Help/helps/Help.hhc +++ /dev/null @@ -1,2643 +0,0 @@ - - - -
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 22 & 23
- -This section describes the analyzer passes "anaphora" and - "anaphoraCompany".
- -![]()
Anaphora Pass
- -Anaphora is a fancy linguistic word for words and phrases that refer - to other words and phrases in a text. One common anaphora relates to pronouns - such as "they" and "its". Other phrases include words - that reference actions such as "the sale", "this last purchase", - etc. Below are highlights from the "anaphora" pass:
- -
AnaphoraCompany Pass
- -First, we simply match an _anaphora node. If we find a suitable company - candidate in previous sentences (shown further below), then we change - our _anaphora to be a _company and point to the company found previously - in the text.
- -
For debugging purposes, we write the results to a dump file called "anaphora.txt". - Here is the final output of this pass:
- -
Searching Through Sentences
- -Once the rule finds an _anaphora node, we can now use our "parse" - concept in the KB to search backward for the company being referred to. - This finally shows the power behind our KB-based analyzer design.
- -Let us remember where we are. We are matching this rule in the context - of the @PATH, which is set to match in sentences and therefore we can - directly access the sentence object we have created under the "parse" - concept of the KB. In our @CHECK area, we will loop through the previous - sentences in the KB, and through the objects we created under those sentences, - in order to find the first object that matches the desired type of anaphora.
- -For example, if the anaphora is "it", then we will look backward - for the first "company" type. If the anaphora is an "action" - type such as "this last purchase", then we will back up to find - the first "action" type. Although this example is simplified, - it can be designed to deal with much more complicated and subtle linguistic - constructions.
- -We loop through the sentences and through the objects within each sentence. - We know by design that there will only be two types of objects: "company" - and "action" so we search for a match accordingly. When we find - a match, we set S("exit") to 1 and that exits our while loops. - If we find no object, we call fail, - a special function for the @CHECK area that aborts the rule match altogether.
- -
Next Section:
- Company Conj
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Pass 24
- -This section describes the analyzer pass "conjCompany".
- -![]()
ConjCompany Pass
- -This pass is another example of conjunctions (see "Money" - section) but this time we are dealing with companies. It is constructed - in the same manner as the conjMoney pass:
- -
The conjunction rule was built primarily to handle the following sentence. - A more general treatment might use a recursive pass to gather conjunctions - one at a time.
- -
Next Section:
- Events
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 19 - 21
- -This section describes the analyzer passes "companies", "companyAttributes", - and "companyDet".
- -
Seeing Green
- -There are currently two colors that appear when highlighting rule matches - in the input text: blue and green. Usually, the text will highlight in - blue, representing newly built nodes. When a rule matches without building - new nodes, the text corresponding to the rule match is highlighted in - green.
- -Companies Pass
- -Below is the highlighting for the company pass in our corporate analyzer, - pass 19:
- -
The rule in this pass finds company nodes, but does not alter the parse - tree. Rather, it updates the KB "parse" area's tracking of company - instances found in the text, within each sentence of the text. The "parse" - area was introduced in the initKB pass.
- -
Also, the "sentences" pass creates a numbered sentence concept - (e.g., "sentence1") for every sentence that it detects in the - parse tree, as well as having the "_sentence" node in the parse - tree refer to its corresponding name in the "parse" area. We - can see this using our handy "View>Tree of Selected" and - displaying any portion of the text as seen below. The sentence object - is written as ("name" "sentence1") ("object" - concept "<name>"):
- -
With this in mind, we now want to create "company objects" - and attach them to the sentence object in the "parse" area of - the KB. Notice below the @PATH command. This directs the rule matcher - to search for matches only in "_sentence" nodes. In addition, - we can access the "_sentence" context node from a matched rule - with the special NLP++ X - function. X(varname) and X(varname, 3) refer to a variable in the last - and third component of the @PATH, respectively. Below, we create a new - company concept with the makeconcept - function and attach it to the sentence "object". We also add - the attributes "type" and "normal" to the new company - concept:
- -
Green Highlighting
- -Now that we understand this pass better, let us look at why the company - rule displays its matches in green.
- -In the above rule, note two things: the use of _xNIL and the absence - of tree building functions in the @POST area.
- -(1) _xNIL is not really a special nonliteral, but it is a convention - that documents when a rule is intended NOT to create a new, or suggested, - node.
- -(2) In NLP++, an empty @POST region uses the single - reduction by default. But as soon as any code is placed in a @POST region, - that default is overridden. To get a rule to create a new node, an action - such as single must be specified - explicitly in that case.
- -With a non-empty @POST area that lacks a reduce action, this rule fires, - but does not change the structure of the parse tree. Because the rule - fired without modifying the tree, the highlighting appears in green.
- -CompanyAttributes Pass
- -Remembering the money pass discussion involving noun phrases, we use - the same technique to gather attributes in the text surrounding companies. - Below are the rules that matched company attribute phrases such as "TAI - (Text Analysis Int'l)", "Founded in 1998, TAI", "California - company", etc. We leave it to you to investigate the companyAttributes - pass:
- -
CompanyDet Pass
- -The companyDet pass stands for company "determiner" pass. - Determiner is a linguistic term for those function words we put in front - of nouns and their adjectives, e.g., "the", "a", "this", - "that". In keeping with our idea of grabbing the entire company - phrase, we add this pass to simply attach the determiner to the company - phrase we are building in our passes 19-21.
- -One interesting function you may have noticed in the previous pass (pass - 20) is pncopyvars. This function - is a handy function that copies all the variables from a matched node - to the newly created node. In this case, we can think of it as passing - all the meaning or semantic information from the _company item in the - rule below, to the new _company tree node being constructed by this rule. - Also notice the presence of the single - action. This builds the new node for the rule. We also include the partial - parse tree for the phrase "the Los Angeles-based AMRP". The - tree shows the semantic information passed up from the _company node below - to the _company node above:
- -
Next Section:
- Anaphora
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Pass 25
- -This section describes the analyzer pass "events".
- -
Important:
- -This is by far the most important section of our corporate analyzer - tour. Here, everything we have done so far will come together.
- -Events
- -In language, it is usual to have some kind of action as the center of - meaning within a sentence. John kicked - the ball. The ball was kicked - by John. Actions are associated with verbs. The corporate world deals - with sales, mergers, acquisitions, and statements of fact about a company, - e.g., "Founded in 1972". Below, we can see the events that our - analyzer recognizes in pass 25:
- -
Event Rule 1
- -Our "events" pass 25 contains two rules. One is for a stock - "event", the second for "buy" and "acquire" - events. The second rule is :
- -
There are several remarkable things going on here. First, if you look - at the graphic above containing the highlighting, you will see that many - events are highlighted, yet there are only two rules in this pass. The - second rule is generic enough to match three quite distinct sentences.
- -This follows from the way in which the analyzer is constructed up to - the current pass. Remember that we gathered not only company names and - money values, but also the attributes in the text surrounding these constructs. - That is, we gathered complex noun phrases to distill the domain-critical - objects from the text. Once we gather all the subphrases into one neat - concept such as _company or _money, we can build abstract rules for events, - as in the second rule above. The idea that "companies buy companies - for money" is clearly expressed by rules at the event level of abstraction.
- -In this way, an information extraction system can become a powerful - tool for accurately and deeply extracting critical content from a text.
- -Generate Rule
- -The "Generate Rule" menu item is a super-accelerator for building - rules by hand. You invoke it from the right-click popup menu of a text - window. It automatically generates rules from text in much the same way - that RUG generates rules.
- -NOTE: - Generate Rule only works if you have previously run the analyzer on the - text with the "Generate Logs" toggle turned on:
- -
Using our other handy function "View>Tree of Selected", - we can take a look at the tree for pass 25 for sentence 5:
- -
Examining the top-level nodes of the parse tree above, you will see - your rule! I.e., "_company have _acquire _company for _money". - This is what Generate Rule does for you automatically, as follows.
- -Below, choose the same text and instead of viewing the tree, select - "Generate Rule". (Note - that the period is not included in the selected text.) Generate - Rule goes to the events pass, opens it up, and places a new rule at the - bottom of the file. You can see the new rule on the left, in the image - below:
- -
We can also use Generate Rule to generate another rule for a second - sentence, with an interesting result in this case:
- -
Note that the two generated rules differ only by the concept "_have", - even though the sentences appear to be very different. Also, notice that - we have left in the "real" rule above the generated rule to - show you the final form. The final rule shows that "_have" is - "optional" and that the verb or action for the event is a list - that matches either _buy or _acquire concepts. In fact, this rule matches - three sentences that on the surface appear to be very different, but linguistically, - turn out to be very similar in structure. And the corporate analyzer has - helped uncover the similarity!
- -Action Concept
- -When the event rules fire, we want to create an action object in the - sentence under the "parse" concept. In the first part of our - @POST area for the above rule, we add the object in the same way we added - our object for company in a previous section. The following code in the - @POST area creates the object in the KB "parse" area:
- -
You can see the resulting KB structure below after the @POST action - code has executed:
- -
Conjunctions
- -The second part of the @POST area for the second rule is where we recover - our company and money conjunctions. Again, conjunctions are groupings - of similar items in a list and are normally tedious to deal with in text - analysis systems. Remembering that we gathered up _money and _company - concepts into arrays, we can now easily loop through those arrays to create - the concepts in our "parse" area of the Knowledge Base. Below, - you can see the two "while" loops where we loop through the - arrays for company and money. The functions addstrval - and addnumval add multiple values - to a concept's attribute. The first adds a string value and the second - an integer value.
- -
One important note here is the use of the special NLP++ function N. Notice - that in the first conjunction area for companies, we are using N("conj - count",4) and in the second, for money, we are using N("conj - count",6). The reason for this is that the _company concept is the - 4th matching element of the rule, and the _money concept is the 6th. We - repeat the rule here for convenience:
- -
Stock Event
- -The stock event is found as the first rule in the "events" - pass file and keys off the word "stock" and the verb "to - be". It works just like the "buy" and "acquire" - rule described above, but does not process conjunctions. It creates a - "stock" event in the sentence.
- -
This rule constructs a slightly different structure in the KB than the - "buy" or "acquire" event. Whereas the second rule - constructs an event concept under its sentence, the first rule constructs - a "stock" concept under the associated company and adds related - information as attributes under the "stock" concept:
- -
Next Section:
- Meta Events
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 5, 6, 7
- -This section describes the analyzer passes "sentences", "paragraphs", - and "removeWhite".
- -
Formatting
- -It is often useful for an analyzer to track the formatting of the input - text as part of characterizing it. Pass 5 groups words into sentences. - It assumes that prior passes, e.g., pass 4 (join), have removed or hidden - periods (and semicolons, question marks, etc.) that are not likely to - be end-of-sentence markers in the current text. The resulting parse tree - is shown below:
- -
Pass 6 groups the sentences into paragraphs:
- -
Another convenient step, which helps simplify rules in subsequent passes, - is to excise white space from the parse tree. In this way, subsequent - rules need not consider white space. Below is a display of a tree before - and after spaces are removed. Before:
- -
The parse tree below results from running Pass 7, called "removeWhite":
- -
Precision Processing
- -An advantage of grouping the text into sentences and paragraphs is that - it makes for a more precise and efficient text analyzer. Subsequent passes - can be instructed to process only within particular contexts, such as - sentences or paragraphs. In this way, spurious matches in unintended areas - of the parse tree are minimized.
- -The @PATH selector, as shown in the pass file for pass 7 below, instructs - the rule matcher to start at the root of the parse tree (named "_ROOT"), - then find children named "_paragraph", then find their children - named "_sentence". Only when such a "_sentence" node - is found does the rule matcher attempt to match the rules of the current - pass.
- -
Next Section:
- Rule Generation
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 8 - 12
- -This section describes the analyzer passes "city", "company", - and "state" in the "words" stub region.
- -
Sample Files
- -We have included a few automatically generated (or "RUG") - passes in the corporate analyzer, for the purpose of "dictionary" - lookup. We describe how we set up this capability in the corporate analyzer.
- -First, we added a folder called "Samples" under which we have - created three files: "cities.txt", "companies.txt", - and "states.txt". Below is "companies.txt". Note that - each text sample (company name in this case) appears on a separate line. - Only multi-word phrases are added to the companies.txt file, for reasons - that will become apparent later.
- -
Stubs
- -Next, we created a "stub", or placeholder in the analyzer - sequence, for automatically generated passes. This allows us to control - where in the sequence of passes these automatically generated passes will - occur. Since we are using RUG for a dictionary-like function, the stub - comes early on in the analyzer flow, right after formatting:
- -
Gram Tab
- -The Gram Tab is where we set up a hierarchy of text samples. We created - a stub concept called "words" and under it, we created rule - concepts for city, company, and state. The Gram Tab allows us to quickly - add text samples to the rule concepts, e.g., by importing the sample files - built above. You can also add samples to the hierarchy manually by highlighting - a text region and selecting the rule concept in which to place it.
- -
Setting Auto-Generation Flags
- -Before using RUG to generate our rules for us, we may need to provide - constraints and instructions that control the rule-construction process. - In the case of literal constructs such as company names, we use the Gram - Concept Properties window to specify that "literal" rules are - to be generated.
- -
Invoking RUG
- -To automatically generate the passes, we now choose "All" - under "Generate Rules" under the "Analyzer" menu:
- -
Automatically Generated Rules
- -Now we can double-click on the rules in the Gram Tab to see the corresponding - passes that have been built. Note, in pass file 10, the warning about - editing automatically generated files. Currently, any edits made to such - a pass file will be overwritten the next time RUG is invoked.
- -Second, notice the form of the rules. RUG creates rules that match the - phrase and rewrites them to "_company". The rules also include - a "@PRE" area that restricts the words to be capitalized or - not. The form of the rules in this pass file is determined by the flags - set in the "Properties" window above.
- -
Highlighting Matches
- -These pass files are like any other pass files in that you can highlight - pass matches. In the Gram Tab, you can click on any rule icon and display - the highlights as show below:
- -
Next Section:
- KB & Dictionary
-
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 13 - 15
- -This section describes the analyzer passes "lookup", "vocabulary", - and "phrases".
- -
Lookup Pass
- -In the last section, we saw how we can automatically generate a dictionary. - In this section, we show how to use the Knowledge Base as a dictionary. - The reason for doing this is that, unlike the current version of the RUG - passes, we cannot attach additional information to the automatically generated - rules.
- -First, look at the @RULES area below. You will notice that we are looking - for phrases of length one through four. We do this simply by writing 4 - rules, attempting to match the longest phrase first:
- -
Next, we examine the @CHECK area, which allows us to accept or reject - a match based on criteria we specify. The objective of this pass is to - look up the matched phrase in the "companies" area of our KB, - which we assume was set up before we built our analyzer. To perform the - lookup, we first fetch the text of the phrase using the phrasetext - function, assigning the text to a variable called "phrase". - We search for the phrase within the "companies" KB concept (defined - in the initKB pass), using the - findhierconcept function. If no - such phrase was found in the KB, we reject the rule match with the special - fail function that exits the current - rule match.
- -
In the @POST area, we "normalize" the phrase whose concept - was found in the KB. Recall that we set up our KB such that we placed - alternative wordings for our companies under a "normalized" - form. So, we use the findattr - function to look for the "synonym" attribute, as above. If it - is there, we need to set the concept's parent as the normalized form of - the phrase. We repeat our graphic from KB initialization here for clarification:
- -
Debug Printouts
- -To help debug the corporate analyzer, we created a dump file called - "lookup.txt". The C++ -like "<<" operator conveniently - pipes values to an output file. Below is a screen shot of the lookup.txt - file.
- -
Vocabulary Pass
- -The "vocabulary" pass illustrates how we can quickly build - vocabulary lookups by hand.
- -
Phrases Pass
- -We can also build a pass for phrases by hand. Note that separating the - "vocabulary" and "phrases" passes enables rules in - the later pass to use nonliterals built in the earlier pass. For example, - the first rule below uses the nonliteral "_conj", or conjunction - token, to handle things like "CEO and president" or "CEO - & president".
- -
Next Section:
- Money
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Pass 3
- -This section describes the analyzer pass "initKB".
- -
Constructing the KB
- -Because the corporate analyzer is expected to analyze more than one - text, we need to make sure the "parse" area is cleaned out each - time. More generally, we need to initialize or reset any parts of the - KB that the analyzer manages dynamically. If the KB happens to not have - a "corporate" concept, the analyzer can recover by creating - that area of the KB from scratch.
- -
NLP++ Knowledge Base Functions
- -To initialize the KB, we'll use predefined knowledge base functions - supplied with NLP++. The initKB pass consists purely of code, with no - rules, as shown in the screen shot below.
- -The function findroot returns - the root node of the KB hierarchy. The first call to findconcept - looks for a concept named "corporate" directly under the root. - A global variable named "corporate" is assigned the corporate - concept, if found (or 0, otherwise). The special function G refers - to a global variable.
- -If the corporate concept was not found, then makeconcept - is used to create it as a child of the root of the hierarchy. (Since the - corporate concept is absent, that means there is no "companies" - area with synonyms for company names. Even so, the analyzer can still - execute, though it may not correlate things like "TAI" and "Text - Analysis International".)
- -If the "parse" concept is found in the knowledge base, then - its descendants are removed with rmchildren. - This clears the parse area so that the new article can be processed with - a clean slate.
- -When initKB is executed, the global variables "corporate", - "parse", and "companies" point to their respective - concepts in the KB. A global variable called "section number" - is also initialized to 0 here.
- -
Next Section:
- Join
| - | -
- CORPORATE ANALYZER |
-- |
Intro
- -Although VisualText may be the most powerful text processing tool around, - it may not be obvious to the first time user how to build an analyzer. - You may know what you want to do, but how do you go about doing it? This - demonstration analyzer gives a first-time user of VisualText an idea of - exactly how an analyzer is built.
- -Notes: - This demonstration analyzer is meant to stimulate ideas in the VisualText - user. It does not represent in any way a complete or exemplary example - of analyzer building. We expect that you've at a minimum studied the Quick Tour and the Tutorials - in order to follow the Corporate tour.
- -
Now is a good time to open the corporate analyzer, as
- described in the Quick Tour, and examine the input file named "Sold.txt"
- in the Dev folder of the Text Tab.
Our Analyzer
- -Before we can build an analyzer, we must have a task in mind. In our - corporate analyzer, we want to pull out information about companies from - newswires. We can pull out information like "who bought whom for - how much", "who's stock changed and by how much", and other - information about companies such as current CEO, founding date, and contact - information.
- -Our corporate analyzer will build records that could be used to feed - a database. This type of analyzer is called an "information extraction" - system. Here is a peek at the corporate analyzer's first output record - for our sample text:
- -
VisualText Features and Tips
- -Key features that make VisualText powerful, flexible, and easy to use - and debug are tabulated in the Quick Tour Introduction. - Some areas we'll focus on in this deeper tour of the Corporate analyzer - are:
- -
Multi-Pass Processing
Knowledge Base
Automatic Rule Generation
Some useful guidelines gleaned from building information extraction - systems are:
- -
Do high confidence work first
Group text into chunks to process
Don't process everything
Don't worry about mistakes if they
- don't hurt you
We will see examples of these ideas at work in our corporate analyzer - example.
- -Plan of Attack
- -The next step is to sketch a way to build this analyzer. Building a - text analyzer is art, not science, and every developer will write a unique - analyzer.
- -An initial decision to make is whether your analyzer will gather localized - information only (i.e., do "shallow" processing), or correlate - information from various parts of a text (or multiple texts). The deeper - and more accurate the analyzer, the more correlation you will need to - do, and the more you will rely on the knowledge base (KB) to store information - about the domain (e.g., "corporate events") and the current - text.
- -The corporate analyzer will utilize the KB in order to demonstrate "going - deep."
- -Knowledge Based Analyzers
- -The first step in building our analyzer is to create a dedicated area - for it within the KB. We start by making a concept named "corporate", - as below. Under that, we create two concepts: "companies" and - "parse". The "companies" concept holds the companies - we are interested in and their alternative wordings, as reference knowledge - for the analyzer. The "parse" concept stores information that - the analyzer creates and uses dynamically.
- -
KB Lookup and Normalization
- -The knowledge base can support looking up and normalizing words and - phrases. For example, to store the fact that "Text Analysis International, - Inc." and "TAI" are synonyms, you can construct a hierarchy - with "TAI" as parent and place its alternative phrasings below - it. Under the "companies" concept, we'll place a normalized - form of a company name, e.g., its abbreviation when it's unique. Under - the normalized form, we place major textual variants. To explicitly specify - the relationship between concepts, we add a "synonym" attribute - to each variant. The screen shot of the KB and Attribute Editor below - depicts this scheme.
- -
The "companies" area under our "corporate" concept - is one we construct beforehand, either by hand or by writing another VisualText - analyzer to populate the knowledge base for us from a file. The "parse" - area, on the other hand, is managed dynamically by the corporate analyzer - while it is processing an input article. We assume, for our demo system, - that TAI and AMRP are the only companies the analyzer needs to know about!
- -Parse Concept
- -In the corporate analyzer, we need to gather information across sentences, - because information about a given company may be spread throughout the - article. For instance, "TAI buys AMRP" occurs in the first sentence, - while the phrase "The sale" in the fourth sentence" refers - back to the first sentence. If the fourth sentence adds useful information, - we need to relate the two. Therefore, we use the knowledge base to build - a model of the article as we process it, enabling correlations across - sentences. Below is a screen shot of the parse area built by the final - version of the analyzer for our sample input article.
- -
Next Section:
- Initial KB
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Pass 4
- -This section describes the analyzer pass "Join".
- -
Tokenization
- -The tokenize pass, which is - the first pass of every VisualText analyzer, performs an initial segmentation - of characters in the input text to alphabetic, numeric, punctuation, and - white space tokens. However, in practice, we may want to treat constructs - such as "$9.99" and "No. 1" as tokens. VisualText - makes it convenient to "join", or "retokenize", a - phrase as a single token.
- -The example rule below illustrates how we might handle phrases such - as "No. 1". The rule itself appears after the @RULES marker. - It matches a phrases that starts with "No", continues with ".", - then any amount of white space (denoted by "star"), and finally - a numeric token. When such a phrase is matched, a new node named "_rank" - is built to dominate the matched phrase. The @POST action specifies what - will be done when the rule has been matched. In this case, the suggested - node, named "_rank", will get a variable named "number" - with the numeric token's text as its value. That is, "No. 33" - will lead to creation of a variable named "number" with value - "33", attached to the "_rank" node. The single - action specifies that a default reduction of the matched phrase is to - be executed. The rule below can be used to bleed, or hide, periods that - we don't want treated as ends of sentences.
- -
Seeing the Matches
- -VisualText allows you to quickly see the matches for any given pass. - The blue text corresponds to nodes built by rule matches in the "join" - pass.
- -
Note that the apostrophe-s in possessive constructs is not highlighted - in blue. That is because the rule that identifies possessives, shown below, - excises the apostrophe and "s" from the parse tree.
- -
Next Section:
- Formatting
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Pass 26-28
- -This section describes the three analyzer passes: eventAttributes, anaphoraEvent, - and events2.
- -
EventAttributes Pass
- -Some phrases describe entire events. Below is one of them. The phrase - "In 2006 alone," describes the "acquisition" event - that follows. Notice that it is in green. We will explain below.
- -
This pass takes care of attaching the date to the "acquire" - event via an attribute. If we look at the resulting information in the - KB, we can see the final format:
- -
Notice in the rule itself that the _event item is already matched. This - pass (26) must come after pass 25 because the rules in pass 26 expect - that events have already been processed. We create a "date" - concept below the action concept and add a "year" attribute - and value to the new date concept. But we do not gather these items under - a new node. Remember that if we have a @POST area associated with a @RULES - area, we need to specifically call an NLP++ action in order to "reduce" - or create a new node under which all the items are gathered. There is - no "single()" function and the suggested node name is "_xNIL", - which is a convention telling us that we are not interested in building - a new node for this rule match. That is why VisualText displays the match - for this rule in "green" (see text above).
- -
AnaphoraEvent Pass
- -Pass 27 is much like pass 23, the anaphoraCompany pass. The purpose - of this pass is to find all the _anaphora concepts and loop back through - the sentences under the "parse" area of our KB to find a match. - Only this time, we are looking for "actions" to match, not "companies". - Below, you can see that phrases that reference other events in the text - are highlighted:
- -
Below you can see the rule and the @POST area for this rule. We are - matching _anaphora and creating a new parent node _eventAnaphora. Notice - that since we have a @POST area, we must call the function "single()" - to create the _eventAnaphora node:
- -
In the above @POST region, we also print out some information to the - dump file "anaphoraEvent.txt" for debugging purposes. This way - we can easily monitor what this pass is choosing as its reference to the - anaphora:
- -
Looping Through the Sentences & - Objects
- -As in pass 23, we will loop back through the sentence concepts we built - under "parse" in the KB to find the "action" objects - we constructed earlier. In layman's terms, we are looking for "action" - events that match phrases like "The sale", "this last purchase", - etc. The code below is almost identical with pass 23 with the exception - of our check for "action" instead of "company":
- -
Events2 Pass (28)
- -This pass uses the previous pass in two ways. One, it looks for the - presence of an _eventAnaphora concept in a particular pattern. Two, once - it finds it, it makes a "comment" concept under the object that - _eventAnaphora is pointing to. Remember that in the previous pass (27), - we looped back through the "parse" area until we found an "action". - In this case, the phrase "The sale" in the 4th sentence ends - up attaching a "comment" concept under the "buy" action - in the second sentence:
- -
Below is the rule that does this:
- -
The second rule in pass 28 does something similar:
- -
Next Section:
- Output
| - | -
- CORPORATE ANALYZER |
-- |
Ana Tab Window: Passes 16 - 18
- -This section describes the analyzer passes "money", "moneyAttributes", - and "conjMoney".
- -
Lessons in Phrases
- -In diagramming sentences in English class, you may have come across - noun phrases (NP). These come - in many many forms and basically represent nouns (persons, places, things) - and attributes about those nouns (color, amount, type). Knowing this, - we can write a more organized text analyzer.
- -In passes 16 - 18, we process money phrases. First we gather the root - money noun (money), then process its attributes (moneyAttributes), and - then gather lists of money constructs (conjMoney).
- -Money
- -In the money phrase, we key off the word "dollars". Since - this is a demonstration analyzer, we will only write rules for those patterns - we are matching in our "Sold.txt" article. The rules below match - constructs such as "$30 million dollars" and "30 million - dollars".
- -
In the @POST area, we perform our "normalization", multiplying - the numeric value in the text by 1,000,000 to compute the number of dollars.
- -Money Attributes:
- -Next, we gather the attributes in the text surrounding the money phrases. - Study the moneyAttributes pass for yourself. Below is the highlighting - for this pass. You can easily see the attribute phrases: "more than - X", "X in cash", "X in assumed debt", "a - total of X", etc.:
- -
- -
Conjunctions
- -In analyzing text, conjunctions can be very painful to handle. Not so - in VisualText. NLP++ includes an array construct that can simplify the - problem of conjoining similar phrases. To illustrate, we will elaborate - one case.
- -In the conjMoney pass, we take the money and value and put it in the - arrays S("conj value") and S("conj type") using the - counter S("conj count"). These will be used in future passes - to loop through and recover the money values.
- -
Tree of Selected
- -Below is the matched conjunction phrase and the tree for that phrase. - Two useful features of VisualText should be pointed out here. One is that - the semantic information is displayed in the trees. Below, you can see - the result of firing the above conjunction rule: ("conj count" - 2) ("conj value" 120000000140000000) ("conj type" - "cash" "assumed debt").
- -The second convenient function is found in the right-click menu of the - processed text window. Select the pass you are interested in (usually - it is already selected), then select any portion of text you want. Using - the right-click menu, choose "View>Tree of Selected" and - the partial parse tree for that text will appear in the context of the - chosen pass. This is a handy function to remember.
- -
Next Section:
- Companies
| - | -
- CORPORATE ANALYZER |
-
-
|
Ana Tab Window: Pass 29
- -This section describes the last analyzer pass, "output". (The - complete Corporate Analyzer sequence is shown below.)
- -
Output
- -One of the beauties of using a KB-based text analyzer is that once you - have everything processed, the output is a simple matter of looping through - the "sentence" concepts in the "parse" area in the - KB and printing out the results. If we open up the sentences under the - "parse" concept, we can easily see what we want to output to - the file. The rule is, if there is a child concept of the object under - the sentences, print it out. If not, don't output anything. Below, this - is clearly illustrated by looking at the concept for "TAI". - Those with a "+" have something to output, those without do - not:
- -
We leave it to you to look at the details of the code for this pass. - Please note, however, that there is no rule for this pass, just a @CODE - area. The last rule-matching pass was pass 28, and all that remains is - to output our results. Notice, when inspecting the output file, that information - from later sentences has been copied back to earlier sentences. This is - due to our analyzer's treatment of "anaphora". Namely, information - later in the text has been correlated to references earlier in the text. - Below is one of the more interesting outputs, taken from sentence 5:
- -
Go forth and build better - analyzers!
- - - - diff --git a/Help/helps/HowToBuild/Corporate/Toc/TOC.htm b/Help/helps/HowToBuild/Corporate/Toc/TOC.htm deleted file mode 100644 index b8f244c..0000000 --- a/Help/helps/HowToBuild/Corporate/Toc/TOC.htm +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - -CORPORATE ANALYZER
-Table of Contents
|
- Pass # |
-
- Name |
-
- Description |
|
-
|
-- | -
- Purpose and strategy for building the corporate analyzer |
|
- 3 |
-- | -
- Knowledge Base initialization |
|
- 4 |
-- | -
- Tokenization and retokenization |
|
- 5-7 |
-- | -
- Formatting text into chunks |
|
- 8-12 |
-- | -
- Working with automatic rule generation in the Gram Tab |
|
- 13-15 |
-- | -
- Dictionaries built by hand |
|
- 16-18 |
-- | -
- Money phrases and lists |
|
- 19-21 |
-- | -
- Company phrases |
|
- 22-23 |
-- | -
- Words that reference previous locations in a text |
|
- 24 |
-- | -
- List of companies in text |
|
- 25 |
-- | -
- Buy, Acquire, and Stock events |
|
- 26-28 |
-- | -
- Event attributes and phrases that refer back to other
- events |
|
- 29 |
-- | -
- Outputting the data to a file |
The Dictionary Lookup Tool is a very handy - tool for building and refining lexicons. This - tool allows users to easily access dictionary sites on the Web and to - display search results within VisualText.
- -To access online dictionaries, the paths to - these sites must be set in VisualText - preferences located under the File Menu.
- -A list of commonly used online dictionary sites and the paths to their - search pages is given below. To - get access to one of these dictionaries, create an entry in the Dictionary - Lookup preferences under Name and copy the URL path into URL input panel. - To - create URL paths for other dictionaries, follow the steps outlined below.
- - -|
- Online Site |
-
- URL Path |
|
- Wordnet |
-
- http://www.cogsci.princeton.edu/cgi-bin/webwn/?stage=1&word= |
|
- Merriam Webster |
-
- http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va= |
|
- Dictionary.com |
-
- http://www.dictionary.com/cgi-bin/dict.pl?term= |
|
- |
-
- http://www.google.com/search?btnG=Google+Search&lr=lang_en&as_q= |
|
- Note: The Google path returns pages for English - only. |
Once set, the dictionaries can be accessed - from the main Tools - Menu, and from the Tools menu in both the Text - Tab Popup Menu and the Text - File Popup Menu. Dictionaries - can also be accessed from the Attribute - Editor.
- -Constructing the URL for an online dictionary - requires some knowledge of CGIs, HTML and FORMS. If - you are familiar with these topics, constructing the URL path for an online - source is fairly routine. You - may want to familiarize yourself with these topics before trying to construct - a URL path.
- -To construct the URL path that can be used - by Dictionary Lookup, you need to do three things:
- -These steps are outlined below using the Google - website (http://www.google.com) as an example.
- -The simplest way to discover the CGI path is - to do a search for a word on the desired site, and then look at the resulting - page's URL path found at the top of your browser.
- -Type in the word baas on the Google search page, and - hit the Google Search button.

In the Address portion of the browser, the - desired URL is displayed.
- -
The syntax for a CGI path specifies the name - for a CGI program just before the ? sign. In - this case, we find the CGI name to be "search".
- -Variables for word lookup are specified after - the question mark "?". Key-value - pairs can be found separated by the ampersand character "&". - Each key-value pair is further separated by an equal sign "=". -
- -The first key-value pair (q=baas) is our search - term "baas" and the second key-value pair (btnG=Google+Search) - is the Google convention used to indicate an unknown key-value pair.
- -From the URL in the Address portion of the - browser above, we have determined the following:
- -The plus sign "+" in the last key-value - pair is a CGI convention for a "space" or "blank" - character.
- -To construct the URL in a format that can be - used by Dictionary Lookup, we need to rearrange the order of the key-value - pairs. The - value for the word key-value pair must be removed and it must be placed - at the end of path.
- -In our Google example, we discovered that the - word key-value pair is q=bass. The - "bass" portion of the key-value pair must be removed, and "q=" - should be placed at the end of our URL. The - unknown key-value pair along with the CGI name - can stay in the same position. The - resulting URL looks like this:
- -http://www.google.com/search?btnG=Google+Search&q=
- - -|
- Note: - Remember to put the question mark after - the CGI Path Name and an ampersand "&" between the key-value - pairs. |
When you copy the URL into the Dictionary Lookup - preference and give it the name Google, Google becomes one of the dictionaries - listed in the list of dictionary choices, allowing you access Google directly - from within VisualText.
- -To construct URLs for advanced or more complicated - searches such as returning only pages in English, you will have to add - additional information to the URL path. This - information can be extracted from the HTML and FORMS used to create the - webpage. Often - it is necessary to use HTML and FORMS since it is difficult to extract - key-value pair information as we did above for simple searches.
- -To illustrate - how you can extract this information, we will use the same Google example - and create a URL for searches that are restricted to English pages only. - (The Google - search page is located at http://www.google.com)
- -From the Google search - page, click on "Advanced Search".
Type in the word baas and restrict the search to return - only pages written in English. - (We have - also restricted the search to 10 results.)

Submit the query and - inspect the Address portion of the browser.
The CGI path is quite long and trying to discover - what key-value pairs are needed to restrict the search to English pages - only will be very difficult. To - find out what part of the CGI path is used to specify only English pages, - you can use the View Source option on the browser to inspect the HTML - source code.
- -The HTML source code can be viewed for the - webpage by right-clicking on the webpage and selecting View Source from - the menu options. You - can search for the specific FORM items you are trying to restrict.
- -Right-click on the browser - window and Select View Source. - The source - code for the webpage is displayed.
First, we need to verify the key name for the - search word. Sometimes, it will be the same as for the simple search. - However, depending on the CGI, the name may be different.
- -Search for the FORM item, - INPUT.
![]()
The key name for the word field is as_q. - Recall, - that the key name used for the simple search is simply q. -
- -Next, we need to find the SELECT form item - for the pulldown menu that will specify a particular language.
- -Search for SELECT. (The - first SELECT form item deals with the number of results. The - SELECT item for language is second.)
![]()
The key name for the language SELECT form is - lr.
- -To find out what key is used to specify English - as the desired language we must search for OPTION.
- -Under SELECT look for - OPTION value that specifies English. -
![]()
This gives us the needed value for restricting - our search to English: lang_en. - We put this together with the SELECT key name "lr" and we get: - lr=lang_en.
- -With these three pieces of information, advanced - search value, select language value, language option value, you can specify - a URL in Dictionary Lookup which specifies pages in English for Google. -
- -http://www.google.com/search?btnG=Google+Search&lr=lang_en&as_q=
- - - - diff --git a/Help/helps/HowToBuild/Tour15/AnalyzerTab/Tour_AnalyzerTab.htm b/Help/helps/HowToBuild/Tour15/AnalyzerTab/Tour_AnalyzerTab.htm deleted file mode 100644 index d616c39..0000000 --- a/Help/helps/HowToBuild/Tour15/AnalyzerTab/Tour_AnalyzerTab.htm +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - -| - | -
- Quick Tour |
-- |
The Analyzer
- -
Click on the Ana Tab button to display the Ana Tab Window.
This window maintains the ordered sequence of passes that define the - current text analyzer. System or built-in pass types (e.g., tokenize) - are represented by flat "DNA" icons. Passes with associated - pass files have twisted DNA icons. Our corporate analyzer has 29 passes:
- -
Stubs
- -You may have noticed that there are two passes with red circles. These - represent "stubs" or placeholders in which automatically generated - passes are deposited. We'll talk about automatic rule generation and the - Gram Tab in a later section:
- -Double Click
- -The most common action in the Ana Tab is to open up a pass file by double-clicking - on the desired pass:
- -
Right-Click and Toolbar
- -The Ana tab has an extensive right-click menu as well as arrows in the - Tab Toolbar that serve for deleting or moving analyzer passes:
- -
- -

Next Section:
- Pass Files
-
| - | -
- Quick Tour |
-- |
Examining the Analyzer Under Construction
- -There are numbers of tools and methods for debugging analyzers, including - highlighting and what is called "Page Mode".
- -Highlighting
- -
Highlighting is a simple and intuitive tool for debugging
- analyzers. Turn on the highlighting toggle in the toolbar:

Then open up Sold.txt and select the Ana Tab window.
- Single click on various analyzer passes. The matched text for each pass
- will be highlighted in blue and green, letting you know which words and
- phrases matched in that pass:

Page Mode
- -Another important debugging tool is called "Page Mode":
- -
Among other things, it allows you to examine the change in parse trees - for each pass.
- -
With the "Page Mode" on, choose the phrase
- "$120 million in cash and $14.3 million in assumed debt" and
- view its tree. Then in the Ana Tab, click on pass 4, "join",
- and travel down the analyzer passes observing the changes in the parse
- tree:

Next Section:
- KB
| - | -
- Quick Tour |
-
-
|
Find Window
- -One other important window in the VisualText interface is the Find window.
- You can search for a word or phrase in specified files and in other analyzers.
- Below, we search for the concept "_company" using Find in Files
-
:

Double-Click
- -Once you have searched on a word, the find window allows you to go directly - to an instance of the word or phrase by double-clicking on the line of - interest:
- -
This will take you directly to the window and highlight the instance:
- -
Hope you enjoyed the - tour of VisualText!
- - - - diff --git a/Help/helps/HowToBuild/Tour15/GramTab/Tour_GramTab.htm b/Help/helps/HowToBuild/Tour15/GramTab/Tour_GramTab.htm deleted file mode 100644 index b5eb946..0000000 --- a/Help/helps/HowToBuild/Tour15/GramTab/Tour_GramTab.htm +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - - -| - | -
- Quick Tour |
-- |
Automatic Rule Generation (RUG)
- -In VisualText, rules can be automatically generated from text samples. - In our corporate analyzer, we use the Gram Tab much like a "dictionary". - More complex samples with subsamples can also be managed in the Gram Tab.
- -
Stubs
- -Stubs are place holders where the automatically generated rules will - appear in the Analyzer Sequence. Notice that the icon for words above - matches the "stub_words" pass below, taken from the Analyzer - Tab:
- -
Double-Click
- -If you double-click on a sample such as "New Hampshire Medical", - the text file of the sample will pop up in the Workspace. In our corporate - analyzer, we are using sample files for our dictionaries. One can imagine - using large lists of words and phrases in files that can be converted - into rules automatically:
- -
If you double click on a rule concept (one with a right-pointing arrow) - such as "company", you can see its corresponding pass file containing - automatically generated rules:
- -
Next Section:
- Debugging
| - | -
- Quick Tour |
-- |
VisualText Features and Benefits
- -VisualText™ is an Integrated Development Environment for building deep - text analysis applications. It is like Visual C++(R), but with specializations - for Natural Language Processing. Some features and benefits of VisualText:
- - -|
- FEATURE |
-
- BENEFIT |
|
- Integrated development environment (IDE) |
-
- Reduces resources needed to build text analyzers |
|
- Rich, integrated GUI tool set and data views |
-
- Accelerates development of deep, accurate - analyzers |
|
- NLP++ Programming Language |
-
- Anything thinkable can be programmed! Users - focus on the task and heuristics rather than programmatic detail |
|
- Hierarchical Knowledge - Base Management System |
-
- Easy to build ontologies, dictionaries, semantics, - and any other desired schemas. |
|
- Automatic Rule Generation (RUG) |
-
- Easy and quick to maintain and enhance analyzers - merely by highlighting text. |
|
- NLP++ integrates code, rules, parse trees, - and KB |
-
- Easy to access/modify knowledge. |
|
- Interpreted NLP++ execution |
-
- Blazing fast modify-and-test development cycle |
|
- Compilation of analyzer and KB |
-
- Fast execution in runtime environment |
|
- Excellent GUI support for debugging analyzers |
-
- Reduced time and effort to debug analyzers |
|
- Multi-pass analyzers |
-
- Modular, maintainable, readable, extensible |
|
- Single parse tree |
-
- No combinatorial explosion; results in efficient - analyzers. |
|
- Paradigm independent, integrates multiple - paradigms and styles of text analysis |
-
- Enables developer to use and combine the most - appropriate methods for the task at hand |
|
- User project for adding C++ code |
-
- Open architecture for easy integration with - 3rd party software, extension of the core capability by the customer. |
|
- Rules operate in specific contexts |
-
- Higher precision, faster execution. |
|
- Built-in confidence operator |
-
- Easy to compute and assess confidence |
|
-
|
-
-
|
Sample Applications
- -Information - Extraction - Systems that accurately extract, correlate, and standardize - the important content of text.
Shallow Extraction - Systems that accurately identify names, locations, dates, - and other atomic features of text.
Search - - Quality search capabilities on the World Wide - Web and other electronic text sources.
Filtering - Systems that are both accurate and fast, to determine if - a document is relevant.
Categorization - Systems to determine the topic of documents.
Data Mining - Finding - important nuggets of information in voluminous texts.
Test Grading - Reading - and matching prose tests with idealized answers.
Summarization - Building a brief, accurate description of the contents of - a text.
Database - Entry - E.g., resumé processing, medical reports, and police reports.
Natural Language - Query - The ability to ask a computer questions using plain text.
GUI
- -VisualText's comprehensive interface allows you to focus on the main - goal: quickly building an accurate and complete text analyzer.
- -
NLP++ Language
- -NLP++™ is a new C++ -like programming language specially designed for - building deep text analyzers:
- -
Knowledge Base
- -VisualText integrates a powerful and flexible Knowledge Base that allows - analyzers to be as smart as you want them to be:
- -
Debugging Tools
- -A suite of debugging tools lets you highlight rule matches, examine - parse trees, and study your analyzer one step at a time:
- -
Flexible, Easy to Maintain, and Fast
- -VisualText is not tied to one style or paradigm of text analysis. If - you can imagine a text analyzer, then VisualText can build it!
- -Being "visual" means easy to build and maintain. VisualText - displays text analyzers in such a way as to make it easy for anyone to - modify or extend existing analyzers.
- -And finally, VisualText is fast. It can substantially cut the cost and - time needed to build text analyzers. Text analyzers under development - are run in interpreted mode, so that you can quickly modify and test your - analyzer. Once a text analyzer is built, you can compile it to run faster.
- - - -Next Section:
- Screen Layout
| - | -
- Quick Tour |
-- |
Knowledge Base
- -A Knowledge Base or "KB" is like a database but differs in - several respects: it is hierarchical and is managed dynamically - by the analyzer. Databases are designed first, then used by programs. - Knowledge Bases are used dynamically with text analyzers and change as - the analyzer processes a text.
- -
Open the KB by selecting the KB Editor toolbar button.
- Open concepts by clicking the + to their left:

Double-Click
- -The corporate analyzer makes heavy use of the KB. Above, there are two - areas under the "corporate" concept: "companies", - and "parse". The companies area is static and is used in looking - up synonyms of company names. The "parse" area is used by the - analyzer to reconstruct the "corporate" world by creating concepts - under each sentence concept, in tandem with processing an input text.
- -Below, we show the result of double-clicking on the "acquire" - concept under sentence 5, then double-clicking on the "comment" - concept. Note that the analyzer has created attributes that describe the - "acquire" event:
- -
Next Section:
- Find
| - | -
- Quick Tour |
-- |
Open the "Corporate" Analyzer
- -
(Actions for you to take are flagged by a yellow arrow
- at the start of a line.) Now it's time for you to load the Corporate Analyzer,
- which can be done in two ways. The first starts with double-clicking the
- desktop icon for VisualText:

The second is by double-clicking the icon - for a particular VisualText analyzer. The icon for the Corporate analyzer - looks like:
- -
Method One: Loading an analyzer within - VisualText
- -
Open VisualText. Next, choose "Open Analyzer"
- under the main menu "File":

You are then prompted to choose an analyzer. Browse to
- c:\Program Files\TextAI\VisualText\apps\corporate and open the file named
- corporate.ana (it may be listed as corporate):

Method Two
- -
Locate the corporate analyzer in your Windows File Explorer
- window. Then double-click on the VisualText analyzer file (.ana). This
- will invoke VisualText and load the corporate analyzer:

You are Now Ready to Start!
- -Once you have VisualText and the Corporate Analyzer loaded, we can continue - our tour.
- - - -Next Section:
- Log Window
| - | -
- Quick Tour |
-- |
Log Window
- -In the bottom left-hand corner resides the Log Window, which monitors - the status of the currently loaded analyzer. Analyzer load and run errors - are shown in the Log Window.
- -
Next Section:
- Text Tab
| - | -
- Quick Tour |
-- |
Examining the Output
- -
After running the corporate analyzer on the input text,
- you can now examine the output in either of two ways. One is to click
- on the "Output" button in the Debug Toolbar:

The second is to click the button next to the Output button and choose - the "output" file from the available dump files:
- -
The Output File
- -The output below shows the purpose of the Corporate analyzer, which - is to extract and correlate key business information from the Sold.txt - file. The name "output.txt" is a special file name in VisualText, - that has its own button on the toolbar. If the analyzer does not output - to a file called "output.txt", the button will be greyed out. - Below is a portion of the output file from our Corporate analyzer. Take - some time to examine the entire content of the output file in VisualText.
- -
Next Section:
- Parse Tree
-
| - | -
- Quick Tour |
-- |
Parse Trees
- -VisualText builds multiple pass analyzers in which each pass uses the - parse tree as modified by the - previous pass. A parse tree is a data structure that records and groups - patterns discovered in the input text. The elements of a parse tree are - called nodes. Each line in the parse tree display below represents one - node, or phrase, within the parse tree. Nodes may carry information in - the form of node variables and values.
- -Tree Buttons
- -
Select the "events2" pass in the Ana Tab, then
- click the "View Parse Tree" button in the Debug Toolbar, as
- shown below.
In this way, you can view the parse tree for the pass that is currently - selected in the Ana Tab. (Note: If the text has been analyzed with Generate - Logs off, then the final parse tree is displayed.) The display shows patterns - and groupings identified in the input text, as well as the node variables - and their values as parenthesized lists of the form ("variable_name" - "value1" "value2" ...).
- -
Viewing Partial Trees:
- -VisualText also allows users to display partial parse trees for selected - parts of the text. The phrase "$14.3 million in assumed debt" - is highlighted in the text window and displayed in a parse tree window, - below.
- -
Next Section:
- Ana Tab
-
| - | -
- Quick Tour |
-- |
Heart of the Analyzer
- -The heart of the text analyzer lies in the pass files, which contain - NLP++ code and rules.
- -Pass File Zones, Regions, and Selectors
- -Pass file areas are marked by words that are blue, all-caps, and start - with an "@". Three commonly used regions are detailed below.
- - -|
- AREA |
-
- DESCRIPTION |
-
- EXAMPLE BELOW |
|
- @PATH |
-
- A Selector that defines the context in which - rules will be tried. |
-
- In the corporate analyzer, most paths are - defined as applying to sentences under paragraphs,under the root node - of the parse tree. |
|
- @RULES |
-
- Marks the start of a Rule Region. An NLP++ - rule consists of a pattern (called a phrase) that is matched against the - parse tree. |
-
- Below, the rules match patterns for constructs such as $120 million - or 160 million dollars. -NOTE: words with underscores (_money) are nonliterals, or abstract - tokens, while those without match raw text ("dollars"); |
|
- @POST |
-
- When a rule matches, NLP++ code in the Post - Region tells the rule matcher what actions to take. See the _money rules - below. |
-
- Below, the numeric value for the money phrase - is calculated and stored on the suggested node. |
- -

Code Region
- -An NLP++ pass file includes a CODE Region that is independent of any - rule matching. One example of this is in the third pass "initKB", - where the analyzer constructs needed concepts in the Knowledge Base before - processing the text:
- -
Next Section:
- Gram Tab
| - | -
- Quick Tour |
-- |
Running the Analyzer on Text
- -
First, select the text you want to process, in the Text
- Tab:

To view the text, either double-click on the text icon
- (above) in the Text Tab, or go to the Debug Toolbar and click on the "paper"
- button:

The text window pops up in the workspace:
- -
The Run Button
- -
To run the analyzer on the selected input text, choose
- the running-man button in the Workspace Toolbar:

The cursor becomes an hour glass and the stop button is activated:
- -![]()
The Log Window will display stats about the run, including any syntax - errors it discovered:
- -
You have successfully run the corporate analyzer on our "Sold.txt".
- - - -Next Section:
- Output
| - | -
- Quick Tour |
-- |
Screen Layout
- -The general screen layout of VisualText includes Toolbars, the Main - Menu, the Tab Window, the Workspace, and the Log and Find Windows:
- -
The principal controls are the Main Menu, the Toolbars, and the Tabs.
- -Main Menu
- -The main menu is a superset of the buttons available in the Toolbars:
- -![]()
Toolbars
- -VisualText has 5 toolbars: Main, Browser, Tab, Knowledge Base, and Debug:
- -![]()
The table below describes each Toolbar:
- - -|
- TOOLBAR |
-
- DESCRIPTION |
|
- Main |
-
- Standard functions found in all GUI applications, - including open, close, cut, and paste |
|
- Browser |
-
- Functions for managing web browser windows |
|
- Tab |
-
- Functions for managing the Gram, Ana, and - Text Tabs |
|
- Workspace |
-
- Functions for the Analyzer and Knowledge Base |
|
- Debug |
-
- Tools for examining the input text file, trees, - pass file, etc. |
- -
Tab Window
- -The Tab Window area accesses three key windows: the Gram Tab, Ana Tab, - and Text Tab.
- -
The table below describes each:
- - -|
- TAB - WINDOW |
-
- DESCRIPTION |
|
- Gram |
-
- Manage user-added text samples for automatic - rule generation |
|
- Ana |
-
- Manage the analyzer sequence and pass files |
|
- Text |
-
- Manage input files, output files, and other - folders and files |
Right Click Menus
- -Right-click popup menus play an important role in VisualText. The Gram - Tab, Ana Tab, Text Tab, Knowledge Base, Pass File Windows, Parse Tree - Windows, Text Windows all employ right-click menus to provide context-sensitive - functions quickly. Below is the right-click menu for the Text Tab:
- -
Next Section:
- Loading
| - | -
- Quick Tour |
-- |
Choosing the Text to Process
- -
Click the Text Tab and open the Dev folder within there.
If Sold.txt has no red checkmark, then click Generate
- Logs in the Analyzer menu and select Run from the Analyzer menu.
The Text Tab is a repository for texts to be processed by your analyzer. - You can organize text files in folders and run the analyzer on individual - files or on entire subtrees of folders and files. Inside the "Dev" - folder, we've selected the text file "Sold.txt" for processing:
- -
Choosing Previously Processed Text - Files
- -In the Tab Toolbar,a recent-text pulldown provides quick access to the - most recently selected texts. This is useful when the Text Tab holds many - files:
- -
Processed Text
- -When a text has been processed, a "+" will appear in front - of the icon and the icon will have a checkmark. You can open the text - file icon and see the log files produced during the analysis (or "run") - of the text:
- -
Next Section:
- Running
The VisualText Quick Tour
-Table of Contents
|
- Title |
-
- Description |
| - | -
- Introduction to VisualText's Power |
| - | -
- General layout of the Graphic User Interface |
| - | -
- Load the demonstration analyzer "Corporate" |
| - | -
- Monitoring the Log File |
| - | -
- Text for developing text analyzers |
| - | -
- Run the analyzer on the text |
| - | -
- Examining the output |
| - | -
- Structures built by the analyzer |
| - | -
- Building the analyzer sequence |
| - | -
- Rules and Code in pass files |
| - | -
- Automatic Rule Generation |
| - | -
- Examining the details of the analyzer at work |
| - | -
- Exploring the Knowledge Base |
| - | -
- Finding words and concepts in files |
VisualText® Help Copyright © 2007 Text Analysis International, Inc. - All rights reserved.
- -VisualText® Copyright © 1999 - 2007 Text Analysis International, Inc. - All rights reserved.
- -NLP++® Copyright © 2000 - 2007 Text Analysis International, Inc. All - rights reserved.
- -Conceptual Grammar™ Copyright © 1999 - 2007 Text Analysis International, - Inc. All rights reserved.
- -Patents Pending by Text Analysis - International, Inc.
- - - -WordNet 1.6
- -Copyright © 1997 by Princeton University. All rights reserved.
- -THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON - UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. - BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON UNIVERSITY MAKES NO REPRESENTATIONS - OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE - OR THAT THE USE OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL - NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER - RIGHTS.
- - - -Microsoft Visual C++ ®, .NET, Microsoft and Windows are registered trademarks - of Microsoft Corporation. Other brands and their products are trademarks - or registered trademarks of their respective holders and should be noted - as such.
- - - -ICU License - ICU 1.8.1 and later
- -COPYRIGHT AND PERMISSION NOTICE
-
Copyright (c) 1995-2005 International - Business Machines Corporation and others
- -All rights reserved.
- -- -
Permission is hereby granted, free of - charge, to any person obtaining a
- -copy of this software and associated documentation - files (the
- -"Software"), to deal in the - Software without restriction, including
- -without limitation the rights to use, - copy, modify, merge, publish,
- -distribute, and/or sell copies of the - Software, and to permit persons
- -to whom the Software is furnished to do - so, provided that the above
- -copyright notice(s) and this permission - notice appear in all copies of
- -the Software and that both the above copyright - notice(s) and this
- -permission notice appear in supporting - documentation.
- -- -
THE SOFTWARE IS PROVIDED "AS IS", - WITHOUT WARRANTY OF ANY KIND, EXPRESS
- -OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF
- -MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT
- -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL - THE COPYRIGHT HOLDER OR
- -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE - FOR ANY CLAIM, OR ANY SPECIAL
- -INDIRECT OR CONSEQUENTIAL DAMAGES, OR - ANY DAMAGES WHATSOEVER RESULTING
- -FROM LOSS OF USE, DATA OR PROFITS, WHETHER - IN AN ACTION OF CONTRACT,
- -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR IN CONNECTION
- -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- -- -
Except as contained in this notice, the - name of a copyright holder
- -shall not be used in advertising or otherwise - to promote the sale, use
- -or other dealings in this Software without - prior written authorization
- -of the copyright holder.
- ------
- -All trademarks and registered trademarks - mentioned herein are the property of their respective owners.
- - - -- - - - diff --git a/Help/helps/Introduction/System_Requirements.htm b/Help/helps/Introduction/System_Requirements.htm deleted file mode 100644 index 921a1d3..0000000 --- a/Help/helps/Introduction/System_Requirements.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - -
VisualText™ runs on PCs with Windows: NT, Windows 2000, Win98, and WinME.
- -Analyzers built with VisualText can run stand-alone or embedded in larger - applications. The runtime system has also been ported to a Redhat Linux - 8.0 environment with a Gnu C++ compiler. Support for Linux and other environments - that compile C++ can be arranged with Text Analysis International, Inc.
- -For VisualText, we recommend a machine running at - 500MHz or greater, with 256MB RAM (128MB minimum), and 250MB available - hard disk. Minimum requirements for monitor are 15" with a resolution - of 1024x768 or better.
- -- - - - diff --git a/Help/helps/Introduction/VTWorkFlow.gif b/Help/helps/Introduction/VTWorkFlow.gif deleted file mode 100644 index a466118..0000000 Binary files a/Help/helps/Introduction/VTWorkFlow.gif and /dev/null differ diff --git a/Help/helps/Introduction/VisualText_Quick_Tour.htm b/Help/helps/Introduction/VisualText_Quick_Tour.htm deleted file mode 100644 index 6e0ae1b..0000000 --- a/Help/helps/Introduction/VisualText_Quick_Tour.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -
Welcome to the VisualText™ Quick Tour, which introduces the major components - of VisualText and shows how these components work together to create, - run, and debug a text analyzer.
- -The Quick Tour walks you through a working analyzer called the Corporate - Analyzer. The Corporate Analyzer demonstrates the features of VisualText - and introduces you to building analyzers using VisualText. It is intended - as a demonstration analyzer only and is meant to be used with the sample - input files provided.
- -In addition to the Quick Tour, we have provided a more detailed tour - of the Corporate Analyzer in the Sample Analyzers "section" (or - "folder" in the Help). The full tour takes you through the step-by-step - process used in building the Corporate Analyzer.
- -We recommend that you run the Corporate Analyzer application as you - go through both the Quick Tour and the more detailed Corporate Analyzer - tour. The Corporate Analyzer application is located in the APPS folder - under your VisualText installation directory, in a folder named corporate.
- -To run the analyzer, follow the steps outlined below:
- -Launch VisualText.
From the File - menu, select Open Analyzer.
In the Open - dialog, navigate to the top level corporate folder (c:\Program Files\TextAI\VisualText\apps\corporate, - by default.)
Select the corporate.ana - file and click Open.
VisualText™ is an integrated development environment (IDE) for creating - text analyzers. What is a text analyzer? Any program that takes as input - text data and produces an output result. Examples include programs that - extract information to populate structured business databases, web page - categorizers, email routers and autoresponders, chat managers, analyzers - for text-from-speech, grammar checkers, and spell checkers. VisualText - is very well suited to information extraction - systems, that is, systems that find and correlate the critical information - in a text. Information extraction systems typically produce records (e.g. - XML) suitable for populating a database.
- -The figure below shows the development process using VisualText. A developer, - using the VisualText IDE, creates a text analyzer. An input text file - is given to the text analyzer, which processes the text and outputs a - result.
- -
VisualText encompass several language-processing methods as well as - mixtures of methods. VisualText is an open architecture, enabling users - to extend its core algorithms and functions. This flexibility enables - users to conveniently and quickly develop text analyzers suited to their - own purposes.
- -- - - - diff --git a/Help/helps/Introduction/Why_Use_It_.htm b/Help/helps/Introduction/Why_Use_It_.htm deleted file mode 100644 index a3cfbf7..0000000 --- a/Help/helps/Introduction/Why_Use_It_.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -
A developer could use another integrated development environment (IDE) - such as Visual C++ to create text analyzers, but developers can rapidly - create accurate applications using VisualText™. This is because all the - machinery needed to write a non-trivial text analyzer is included in VisualText, - while a developer would need to write that machinery first in another - programming environment. This machinery includes, for example, rule syntax - specification and interpreter, a parse tree builder, an integrated knowledge - base, and much more.
- -In the past, text analyzers could be maintained only by the original - developers or by programmers with specialization in natural language processing - (NLP) or by computational linguistics. VisualText changes all that, allowing - non-programming staff to update text analyzers by adding text examples - with simple point-and-click commands.
- -For further information, see http://www.textanalysis.com. -
- -- - - - diff --git a/Help/helps/LJ.htm b/Help/helps/LJ.htm deleted file mode 100644 index bce8d18..0000000 --- a/Help/helps/LJ.htm +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - -
Left-justify number in a given field size.
- -LJ(num,fieldsize_num)
- -@CODE
- -- -
@@CODE
- -rightjustifynum, - percentstr, Formatting - and I/O Functions
- - - - diff --git a/Help/helps/Log_Window.htm b/Help/helps/Log_Window.htm deleted file mode 100644 index 7904056..0000000 --- a/Help/helps/Log_Window.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -The Log Window displays basic information about an analyzer when an - analyzer is opened as well as information about passes as they are processed - and applied. It can be a valuable tool when debugging your analyzer.
- -
Log Window messages are divided into Informational - Messages and Error - Messages. Both types of messages provide a brief description of the - activity in the "Event" column. A more detailed description - of the activity is given under "Details". When an Error (or - warning) Message is displayed, the pass file number and the line containing - the error in the pass file is provided in the Details column.
- -One feature of the Log Window is the ability to open a pass file that - has been flagged by an Error (or warning) Message. You do this by simply - clicking on the Error line in the Log Window. The pass file is opened - in the Workspace and the cursor is placed at the exact spot in the file - with the error.
- -The Log Window display can be cleared by right-clicking in the Log Window - and selecting Clear.
- -For more on messages displayed in the Log Window, see Log - Window Messages.
- -- -
- - - - diff --git a/Help/helps/MULTI.htm b/Help/helps/MULTI.htm deleted file mode 100644 index b6ed13f..0000000 --- a/Help/helps/MULTI.htm +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - -
The MULTI Selector lets you specify a list - of node names to be searched for independently in the parse tree. The - entire subtree under such a context node will be traversed to look for - rule matches. (The MULTI Selector currently does not check the unsealed - flag.)
- -It may be useful to know that the MULTI algorithm proceeds from the - most deeply buried phrases (i.e., those at the leaves of the parse tree) - to the phrase immediately below the context node.
- -Below is a cautionary note on using the MULTI Selector.
- -MULTI in combination with either of the element modifiers [s] (i.e., - singlet) or [tree] can lead to unexpected behavior, such as matching the - same pattern multiple times. Normally, you will want to avoid using these - rule element modifiers when specifying a MULTI traversal of a parse subtree. - The problem surfaces in rules of the form
- -_X <- _Y [s] @@
- -that is, where the right-hand-side consists of a phrase of one element. - If _Y matches a buried node, then it will match the same node every time - an ancestor of that node is traversed. E.g., given the subtree
- -_CONTEXT_NODE
- |
-...._A ....
- |
- _B
- |
- _C
- |
- _Y
then _Y, _C, _B, and _A will all match the above rule when MULTI is - the selector, yielding a (presumably) undesirable subtree such as
- -_CONTEXT_NODE
- |
-...._X ....
- |
- _A
- |
- _X
- |
- _B
- |
- _X
- |
- _C
- |
- _X
- |
- _Y
- - - - diff --git a/Help/helps/Misc/ScreenLayout.gif b/Help/helps/Misc/ScreenLayout.gif deleted file mode 100644 index 0a73baf..0000000 Binary files a/Help/helps/Misc/ScreenLayout.gif and /dev/null differ diff --git a/Help/helps/Misc/StatusBar.gif b/Help/helps/Misc/StatusBar.gif deleted file mode 100644 index 9b36251..0000000 Binary files a/Help/helps/Misc/StatusBar.gif and /dev/null differ diff --git a/Help/helps/N.htm b/Help/helps/N.htm deleted file mode 100644 index e22e61e..0000000 --- a/Help/helps/N.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - -
Reference to a parse tree node or its variable. See - Variables.
- - - - diff --git a/Help/helps/NLP_PP_Stuff/AT-CHECK_Actions.htm b/Help/helps/NLP_PP_Stuff/AT-CHECK_Actions.htm deleted file mode 100644 index 7348a06..0000000 --- a/Help/helps/NLP_PP_Stuff/AT-CHECK_Actions.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - -CHECK Actions operate after - the rule's right-hand-side phrase has matched.
- -The or action is the only specialized - function built for this region. General NLP++ code serves to implement - most CHECK Actions that you would want to perform.
- -Two special NLP++ functions operate in the - CHECK Region. When a rule match is to be aborted, the function fail - is called to accomplish this. To succeed without performing further checks, - call the succeed function. Both - of these can occur in other regions, but may operate differently. If succeed is executed, then element actions - and POST Actions are performed next.
- -The CODE Actions in this section predate the - NLP++ language, but are retained because they are still useful. In subsequent - releases, these actions may be modified.
- -CODE Actions are divided into two groups:
- -Variable - Actions
Print - Actions
Actions available in the CODE Region are provided in the tables below. - For examples - on using these actions, refer to the individual action topics in the @CODE - Actions section.
- -|
- ACTION(ARG1,ARG2...) |
-
- DESCRIPTION |
|
- varstrs(varname) |
-
- Create an empty multi-string-valued global variable with name varname. - The POST Action addstrs() adds - values to this type of variable. |
|
- sortvals(varname) |
-
- Sort the strings in multi-string-valued global variable varname. |
|
- gtolower(varname) |
-
- Convert the strings in multi-string valued - global variable to lower case. |
|
- guniq(varname) |
-
- Remove redundancies in a sorted, multi-string - valued global variable. |
|
- lookup(var,file,flag) |
-
- Specialized word lookup. Global - variable var - has multiple words as values. file - is a file of strings, one per line. flag - tells which bit-flag of the word's symbol table entry to modify. E.g., - lookup("Words", "dict.words", - "word") looks up all the values in the Words - variable in the dict.words file - and modifies the word bit-flag - (which says whether the word is a proper English word). |
|
- CODE Action |
-
- Description |
|
- print(str) |
-
- Print str to the standard output (usually - the console or DOS window). (See startout - below). |
|
- printvar(var) |
-
- Print the values of the global - variable named var to standard - output. (See startout - below). |
|
- fprintvar(file, - var) |
-
- Print the values of the global - variable named var to file. |
|
- prlit(file, - str) |
-
- Print the literal string str - to file. |
|
- gdump(filename) |
-
- Dump the all the global variables and their - values to the given filename. |
|
- fileout(file) |
-
- Open file - for appending. File becomes a - variable useable in print actions with a file argument, e.g. prlit(). |
|
- startout(0) |
-
- Divert standard output to the main output - file, set by the caller of the analyzer (default is output.txt). |
|
- stopout(0) |
-
- Stop diverting standard output to the main - output file. Subsequent file-less output is to standard output. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/AT-POST_Actions.htm b/Help/helps/NLP_PP_Stuff/AT-POST_Actions.htm deleted file mode 100644 index 05e5b86..0000000 --- a/Help/helps/NLP_PP_Stuff/AT-POST_Actions.htm +++ /dev/null @@ -1,1055 +0,0 @@ - - - - - - - - - - -
NLP++ code in the POST Region executes after - the rule matcher has successfully matched a rule and the match is accepted. -
- -POST Actions are divided into four groups:
- -Node - Actions
Reduce - Actions
Print - Actions
One suite of POST Actions for the RFA (Rule-File Analyzer) is not described, - as they are not relevant to the VisualText™ user. Their names typically - begin with the prefixes rfa- or - rfb-.
- -Actions available in the POST Region are provided - in the table below. For - examples on using these actions, refer to the individual action topics - in the included in the @POST Actions sections.
- -|
- POST Action |
-
- Description |
|
- pncopyvars(aPnode) -pncopyvars(num) -pncopyvars(0) |
-
- Copy a node's variables to the suggested node - of a rule match. Must be called from the POST Region and can be considered - a new-style NLP++ action. See - pncopyvars. |
|
- setbase(num, bool) |
-
- Set the BASE attribute of the numth - node to "true" or "false". |
|
- setunsealed(num, bool) |
-
- Set the UNSEALED attribute of the numth - node to "true" or "false". |
|
- xrename(name [, num]) |
-
- Rename the numth - context node to name. - If num is absent or 0, rename - last context node. |
|
- POST Action |
-
- Description |
|
- setlookahead(num1) |
-
- Set the node that rule matcher will continue - with, after the current rule match is done. New - in 1.7.5.2 |
|
- single() |
-
- Single-tier reduce. Reduce the entire set - of nodes that matched a rule phrase. |
|
- singler(num1,num2) |
-
- Single-tier reduce of a range of rule elements. - eg, if finding a period to be end-of-sentence in context, we only want - to reduce the period to end-of-sentence, not the whole context. |
|
- singlex(num1,num2) |
-
- Single-tier reduce of a range of rule elements. - All nodes not in the range are EXCISED. eg, if matching a keyword html - tag, we only want to reduce the keywords and to zap the rest of the tag. |
|
- singlezap() |
-
- Single-tier reduce. Excise all the nodes in - the matched phrase. |
|
- merge() |
-
- Single-tier reduce that DISSOLVES each top-level - node in the matched phrase. |
|
- merger(num1,num2) |
-
- Single-tier reduce that DISSOLVES each top-level - node in the matched range. |
|
- listadd(olist,oitem - [, keep]) |
-
- Add a new node to a list node's children. - If the item occurs after the list (olist - < oitem), - it is added as the last child. If the item occurs before the list, it - is added as the first child. The optional keep arg can be "true" - or "false". If "true", it keeps the nodes between - the list and the item as children of list. If "false", it excises - all the intervening nodes. |
|
- excise(num1,num2) |
-
- Excise the nodes matching the range of elements - from the parse tree. For multiple excise actions, operations must be ordered - such that the highest number is listed first in the operation. |
|
- splice(num1,num2) |
-
- DISSOLVE the top level nodes of given range. |
|
- group(num1,num2,label_str) |
-
- Reduce the range of rule elements (num1,num2) - and name the group node label. - Unlike other reduce actions, this one can be repeated. WARNING: - The rule element numbers change after each group action, so subsequent - POST Actions must account for the new numbering of the rule elements. - Reimplemented as an NLP++ function so that args can be NLP++ expressions. |
|
- noop(0) |
-
- Perform no POST Action. This is a convenience - to disable the default single() - reduce action. |
|
- POST Action |
-
- Description |
|
- print(str) |
-
- Print the literal string str - to standard output. |
|
- printr(num1,num2) |
-
- Print the text for the rule element range - from num1 to num2 - to standard output. |
|
- prchild(file, - num, name) |
-
- Look for name - immediately under the node matching rule element num. - Print its text to file, if found. |
|
- prtree(file, - num, name) |
-
- Look for name - anywhere under the node matching rule element num. - Print its text to file, if found. |
|
- prxtree(filename, prestr, |
-
- To the filename, - print the first node called name - found in the ordth element's tree, - preceded by prestr and followed - by poststr. If named node is not - found, nothing is printed out. E.g., prxtree("out.txt", "date: - ", 3, "_date", "\n") prints out a line like "date: - 3/9/99 <cr>" if a _date node is found within the subtree of - elt 3. |
|
- prlit(file, - str) |
-
- Print the literal string str - to file. |
|
- fprintnvar(file, - var, ord) |
-
- To the file, - print the value of the variable var - in the ordth element's node. |
|
- fprintxvar(file, - var, ord) |
-
- To the file, - print the value of the variable var - in the ordth context node. |
|
- fprintgvar(file, - var) |
-
- To the file, - print the value of the global variable var. |
|
- gdump(file) |
-
- Dump all the global variables and their values - to file. |
|
- xdump(file, - ord) |
-
- Dump all the variables in the ordth - context node and their values to file. |
|
- ndump(file, - ord) |
-
- Dump all the variables in the ordth - phrase element's node and their values to file. |
|
- sdump(file) |
-
- Dump all the variables in the suggested node - and their values to file. |
|
- prrange(file, - num1,num2) |
-
- Print the text under a range of rule elements - (num1,num2) to - file. |
|
- pranchor(file,num1,num2) |
-
- Print a web URL to file. - Treat the range (num1,num2) as - a URL. Use the global variable named Base - to resolve and print complete relative URLs. (a prior pass must find the - <base> HTML tag and set Base - appropriately. NOT yet using the file's URL, so not handling cases where - <base> itself is a relative URL.) |
|
- POST Action |
-
- Description |
|
- addstrs(var,num) |
-
- Add a string to the multi-string global - variable var. Fetch the string - from the nodes matching rule element num. - var should have been declared - using the CODE Action varstrs(). - (REMOVED. Use NLP++ array syntax - instead.) |
- - - - diff --git a/Help/helps/NLP_PP_Stuff/AT-PRE_Actions.htm b/Help/helps/NLP_PP_Stuff/AT-PRE_Actions.htm deleted file mode 100644 index 087bcce..0000000 --- a/Help/helps/NLP_PP_Stuff/AT-PRE_Actions.htm +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - -
PRE Actions operate after a - rule element has successfully matched. They provide further constraints - on the element match, and may result in the match being rejected if the - additional constraints are not met. PRE Actions provide - the only means for specifying additional constraints on element matching. -
- -Unlike other actions, PRE Actions - have a mandatory range. Their form is
- -<num,num> - pre_action_name(args....)
- -The PRE Action applies to each rule - element in the <num, num> range individually.
- -PRE Actions operate only on tokens, or leaf nodes of the parse tree, - at present. So, if the current node covers more than a single - leaf node, the PRE Action automatically fails. - Another thing to be careful of is that PRE Actions disregard the base attribute of a node. That is, even - if the current node or a subnode has the base - attribute set, the PRE Action will look under it for the leaf node.
- - -|
- Note: - The PRE Region does not currently accept general NLP++ functions, expressions, - and statements. |
Actions available in the PRE Region - are provided in the table below. For - examples on using these actions, refer to the individual action topics - in the @PRE Actions section.
- - -|
- PRE Action |
-
- Description |
|
- uppercase() |
-
- Succeed if leaf token is all uppercase. |
|
- lowercase() |
-
- Succeed if leaf token is all lowercase. |
|
- cap() |
-
- Succeed if leaf token has capitalized first - letter. |
|
- length(num) |
-
- Succeed if leaf token has length exactly equal - to num. |
|
- lengthr(num1,num2) |
-
- Succeed if leaf token length is in the range - of lengths (num1,num2), - inclusive. |
|
- numrange(num1,num2) |
-
- Succeed if leaf token is numeric in the given - range. |
|
- unknown() |
-
- Succeed if leaf token is an unknown word. - Meaningful only if a prior pass has performed the CODE Action lookup(). |
|
- regexp(str) |
-
- Succeed if regular expression str matched. - str may - include characters, with ? meaning a single char, * meaning 0 or more - chars. |
|
- regexpi(str) |
-
- Like regexp, - but case insensitive. |
|
- var(str) |
-
- Succeed if matched node has a variable called - str with nonzero value. |
|
- vareq(str,str_or_num) |
-
- Succeed if matched node has a variable called - str whose value equals a string - or numeric value in str_or_num. |
|
- varne(str,str_or_num) |
-
- Succeed if matched node has a variable called - str whose value does not equal - a string or numeric value in str_or_num. |
|
- varz(str) |
-
- Succeed if matched node has a variable called - str with zero value (or lacks - the variable altogether). |
|
- debug() |
-
- Succeed unconditionally. Used to place a C++ - breakpoint at a particular rule. |
- -
NLP++™ is a general purpose programming language that integrates extensions - for natural language processing (NLP). In addition to a C++ -like code - syntax, NLP++ embodies a syntax for pass files, contexts, rules, and actions. - Similar to LISP, NLP++ is a loosely-typed language. In - addition to integer, string, and array data types, NLP++ includes parse - tree and knowledge base data types. In this way, the user can naturally - address the rules, parse trees, and the knowledge base, while using C++ - -like code to embed heuristics. Integration with the parse tree makes - it possible to manipulate nodes and to manage semantic information within - them. Integration with the knowledge base makes it possible to dynamically - create and manage complex data structures. Integration with rules makes - it possible to control every aspect of rule matching, to exploit context, - and to elaborate the actions that follow rule matching.
- -NLP++ supports Concept Oriented Programming (COP), enabling you to focus - on heuristics, the domain, and the task, rather than the underlying data - structures. Because VisualText supports an interpreted environment, you - can modify and test without having to wait for code to compile, which - accelerates the development of text analyzers.
- -NLP++ is an evolving language but is already rich and robust.
- -As implemented in VisualText, a text analyzer consists of:
- -the analyzer sequence, - which specifies the order of passes, their types, and their associated - pass files
the pass files themselves
the associated knowledge - base
miscellaneous code and - data
NLP++ code and rules occur entirely within pass files. Everything contained - within a pass file is considered to be part of the NLP++ language, including - region markers (e.g., @RULES and @@RULES), specialized regions, code, - actions, rules, and comments.
- -NLP++ combines several types of syntax:
- -Pass file markers such - as @RULES
Code syntax
Rule syntax
One region of pass files, the PRE Region also - has an element range construct, e.g., "<1, 3>" that is - not found elsewhere. We strive to keep the syntax sets as integrated as - possible. For example, double quoted "abc" is a string in every - context, and C/C++ conventions for backslashed characters are used everywhere. - # is used for comments throughout, and a token starting with an underscore - (e.g., "_noun") denotes a nonliteral everywhere.
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/About_NLP++_Variables.htm b/Help/helps/NLP_PP_Stuff/About_NLP++_Variables.htm deleted file mode 100644 index 5e495d5..0000000 --- a/Help/helps/NLP_PP_Stuff/About_NLP++_Variables.htm +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - - -
There are two broad classes of variables in NLP++:
- -general variables
parse tree node - variables
Global variables and - local variables are the only general class implemented to date. - Globals are referenced by the special G function. Local - variables are denoted by L, - and currently specify parameter lists and appear within user-defined NLP++ - function definitions in the @DECL region.
- -Parse tree node variables, or - node variables for short, are - attached to particular nodes in the parse tree, and serve to decorate - the tree with semantic information. The special functions N, X, and S refer to parse tree nodes in the context - of a matched rule.
- -The special NLP++ functions that reference variables are tabulated below:
- - -|
- VARIABLE |
-
- DESCRIPTION |
|
- G(varname) |
-
- Global variable. |
|
- S(varname) |
-
- Variable belonging to the suggested - concept of a rule. |
|
- X(varname - [,num]) |
-
- Variable belonging to the numth - context node starting at the root - of the parse tree. Usually used to refer to the numth - node of the @PATH select list. With @NODES, the preferred form is X(varname). |
|
- N(varname [,num]) |
-
- Variable belonging to - a node that matched the numth element of - a rule phrase. |
|
- L(varname]) |
-
- Local variable, specifies user-defined NLP++ - function parameters and appears in function body. |
|
-
|
-
-
|
The shorthand notations N(varname) - and X(varname) refer to the last - element of the phrase and the last context node, respectively. The former - is convenient for rules that have only one element in their phrase. The - latter is convenient when using the @NODES - selector. N(varname, 0) and X(varname, 0) have the identical meaning.
- -There is no notion of a local variable or pointer, at this time. S variables are often used as an idiom - for local variables (the difference is that they "hang around" - if a new node is suggested by the current rule).
- - -|
- Note: - Variable names must be quoted. E.g., N("unknown word", 2) |
WARNING: X(varname,num) does NOT refer to the numth member of a @NODES list. That list is - not a path in the parse tree. We recommend using X(varname) with @NODES, to avoid "blindly" - traversing down the parse tree. Using X(varname,2), for example, implies - that you know what the nodes immediately below the root are. Such a use - should be clearly documented.
- -To get useful information from the parse tree and other sources when - analyzing a text, some special variable names have been provided. All - start with a dollar sign ($). - No such variable names are usable with suggested (S) - variables, at present.
- -Note the following about using special variables:
- -Special variable names must be quoted. E.g., N("$text", - 2).
You should not assign to or create your own "dollar" - variables. NLP++ reserves all variable names that start with a dollar - sign.
The $uppercase, $lowercase, $cap, and $unknown - differ from the analogous PRE Actions in that they all traverse down to - the "leafiest" node they can find, in order to perform their - check. The corresponding PRE Actions only chain down if the [s] flag is - present in the associated phrase element(s). Also, the $ variables are - not stopped by a [base] attribute in a node.
See - Special NLP++ Variables for a listing of the special variables.
- -N, - X, - and S - can, in addition to referring to a node's variables, refer to the node - itself. Thus N(2) - refers to the first node that matched element 2 of the matched rule. N() and N(0) refer - to the last rule element's (first or only) node. Similarly, X(2) refers - to the second context node in the @PATH dominating the current rule. S() refers - to the suggested concept.
- -NLP++ is a loosely typed language. - The same - variable can be assigned an integer in one statement and a string in the - next. Type - is determined by usage -- there are no type declarations for variables.
- -G("tmp") = 123;
- -G("tmp") = "abc";
- -- -
Variables can take multiple - values, in which case they are called arrays. - Each value - in an array can be of an arbitrary data type:
- -- -
G("tmp")[0] = 123;
- -G("tmp")[1] = "abc";
- -- -
See the Data - Types topic for more details about arrays and other data types.
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/About_Pass_Files.htm b/Help/helps/NLP_PP_Stuff/About_Pass_Files.htm deleted file mode 100644 index ff40188..0000000 --- a/Help/helps/NLP_PP_Stuff/About_Pass_Files.htm +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - -
A pass file holds the NLP++ code and rules associated with a Pattern - or Recursive pass type. Five zones divide a pass file and are ordered - as follows:
- - -|
- ZONE |
-
- DESCRIPTION |
|
- Declare |
-
- Contains user-defined NLP++ function definitions. |
|
- Code |
-
- Contains NLP++ code that is independent of - rule matching. |
|
- Context |
-
- Selects nodes of the parse tree. Rules will - match only against the phrases immediately under the selected nodes. |
|
- Minipass |
-
- Contains nested minipasses called Recurse - Regions. Each Recurse Region is named and contains a Grammar Region. Rule - elements in the Grammar Zone can invoke these named rule sets. |
|
- Grammar |
-
- Contains the main Grammar Region of the current - pass file. |
A minimal pass file may consist solely of a Code Zone or a Grammar Zone.
- -If absent, the Context Zone defaults to the selector
- -@NODES _ROOT
- -which traverses the phrase immediately below the root of the parse tree, - invoking the rule matcher on each node of the phrase.
- -The '@' sign is a reserved character that indicates the start of a region - (e.g., @CODE) or a selector (e.g., @NODES).
- -To indicate the end of a region, the name of the region preceded by - two '@' signs is used. The end of a Code Region is indicated by @@CODE. - End markers are optional in most cases.
- -A lone @@ marker indicates the end of a rule, e.g.,
- -_NP <- _NOUN @@
- -Pass file markers are case-insensitive. A - marker such as @PRE can be written as @pre.
- - -|
- Note: Unlike pass file markers, NLP++ functions - and actions are case-sensitive. |
- -
Code Zone
-Context Zone
-Minipass Zone
-Grammar Zone
- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Actions.htm b/Help/helps/NLP_PP_Stuff/Actions.htm deleted file mode 100644 index 1941de3..0000000 --- a/Help/helps/NLP_PP_Stuff/Actions.htm +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - -
Actions are NLP++ functions that are specialized to know about particular - contexts. For example, the POST Action single - assumes that a rule has successfully matched.
- -Historically, actions preceded NLP++, and many do not allow full NLP++ - expressions as arguments. The CODE, PRE, CHECK, and POST regions all have - associated actions.
- -Many actions, such as the PRINT actions, are superseded by the C++ -like - << operator and are retained for backward compatibility.
- - -|
- Note: - Some actions are slated for review. |
- -
NLP++ code syntax is similar to C - or C++ code. Further topics within the Code Syntax section elaborate the - tokens, data types, variables, operators, functions, actions, expressions, - statements, arrays, and other constructs of the language.
- -An interesting feature of NLP++ is that variables are named by strings - and not by identifiers. You can primarily refer to variables with the - G(), X(), - N(), and S() - special functions, which refer to a global, context, node, and suggested - node variable respectively. Some - functions take variable names as arguments, e.g., pnvar.
- -NLP++ data types include integer, float, string, - parse tree, and knowledge base types.
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/Code_Zone.htm b/Help/helps/NLP_PP_Stuff/Code_Zone.htm deleted file mode 100644 index e3b1e15..0000000 --- a/Help/helps/NLP_PP_Stuff/Code_Zone.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - -
The Code Zone is reserved for regions of NLP++ code that are independent - of rule matching.
- -Currently, the only region implemented within the Code Zone is the CODE - Region, which is delimited by @CODE and (optionally) by @@CODE, and operates - before any rule matching is executed - for the current pass file.
- -A pass file may consist entirely of a Code Region.
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/Context_Zone.htm b/Help/helps/NLP_PP_Stuff/Context_Zone.htm deleted file mode 100644 index 6250c2d..0000000 --- a/Help/helps/NLP_PP_Stuff/Context_Zone.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - -
The Context Zone of a pass file specifies methods for selecting - nodes of the parse tree. Each selected - node, or context node, - serves as a locus for rule matching. The @SELECT and @@SELECT markers - optionally delimit the Context Zone.
- -The Context Zone can come either before or after the Code Zone. The - Context Zone is also optional. If - it is absent, it is equivalent to
- -@NODES _ROOT
- -That is, rule matching will occur in the phrase of nodes immediately - under the root node of the parse tree.
- -The mode of rule matching depends on the selector (e.g., @NODES above) - and the pass algorithm type (e.g., Pattern or Recursive) for the current - pass. For example, with the selectors NODE or PATH, the phrase immediately - under the selected node is subjected to rule matching. With the MULTI - selector, every phrase in the subtree of the selected node is subjected - to rule matching.
- -Within the Context Zone, a single SELECT Region may be specified. Currently, - a pass file may include at most one selector - (i.e., @NODES, @PATH, and @MULTI).
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/Functions.htm b/Help/helps/NLP_PP_Stuff/Functions.htm deleted file mode 100644 index c854dc2..0000000 --- a/Help/helps/NLP_PP_Stuff/Functions.htm +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - -
NLP++ provides a variety of predefined functions for managing the parse - tree and knowledge base. Convenient functions also support output formatting, - string handling, and spelling. The spell functions can be used to help - with unknown word lookup by a text analyzer.
- -As NLP++ evolved from an "action language" for rules, the - Actions section provides functions that expect to apply before, during, - and after the matching of a rule. They - are "rule-aware," in that they can address the matched nodes, - the suggested concept, and the "dominating" or context nodes - within which the rule match occurred. The - actions are deprecated in the sense that some of them cannot accept full - NLP++ expressions as function arguments, but require literal arguments. - Some actions, - such as group, have been upgraded to full-fledged NLP++ functions and - are listed in both the Actions and Functions sections.
- - -|
- Note: - Boolean type is currently implemented by integer 1 - (or non-zero) for true and 0 for false. - Floating point type is newly (but incompletely) available. Char - type is not implemented. |
Formatting - and I/O Functions
- -Math Functions
- - - - - - - - - -- - - -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Functions_and_Actions.htm b/Help/helps/NLP_PP_Stuff/Functions_and_Actions.htm deleted file mode 100644 index 35451ab..0000000 --- a/Help/helps/NLP_PP_Stuff/Functions_and_Actions.htm +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - -
NLP++ supports function calls, which have a similar form to other programming - languages (such as C/C++):
- -functionName(arg1, - .... argN)
- -where functionName is constrained to be alphabetic and where each argument - to the function may be an NLP++ expression.
- -Only call-by-value arguments are supported at present. That - means that when a variable is used as an argument, its value is not changed - by a change to the local variable that it becomes associated with in the - function.
- -Functions have no template or declaration -- only a definition. Even - so, you may use a function in one pass and define it in a subsequent pass - (forward reference). The - parameters to functions take arbitrary data types that may vary dynamically. - Return - statements similarly return arbitrary data types. The - same function could return a numeric value in one call and a string in - another. We - discourage the abuse of this extreme flexibility, however! The - new L variable - reference has been introduced to support formal function parameters as - well as local variables within a function body. Recursive - functions are also possible. The - example below illustrates the definition and use of user-defined functions - in NLP++.
- -@DECL
- -xuf(L("var"))
- -{
- -"output.txt" - << L("var") << "\n";
- -L("local") = 3; # - create a local variable.
- -"output.txt" - << L("local") << "\n";
- -return - 1+2;
- -}
- -- -
facto(L("num")) # - recursive factorial function.
- -{
- -if - (L("num") <= 0)
- -return - 1;
- -return - L("num") * facto(L("num") - 1);
- -}
- -@@DECL
- -- -
@CODE
- -G("x")[2] = 3;
- -"output.txt" - << G("x") << "\n";
- -xuf(G("x"));
- -"output.txt" - << "4! = " << - facto(4) << "\n";
- -@@CODE
- -- -
The code above prints - out
- -0 0 3
- -0 0 3
- -3
- -4! = 24
- -Actions, e.g., single, are specialized - functions that don't take generalized NLP++ expressions as arguments. - Though - some actions have been upgraded and now take NLP++ arguments (e.g. group), some actions have not been upgraded - and the argument must be a literal value.
- -A unique feature of actions in the PRE Region is that they have a mandatory - range. The - syntax is as follows:
- -<num,num> - pre_action_name(args....)
- -The action applies to each rule element in the <num, num> range - individually.
- -See Actions as a starting point for per-page - descriptions for actions.
- -NLP++ function and action names are case-sensitive.
- -In VisualText 1.2 and later, user-defined NLP++ functions are fully - supported, including parameter lists, return statements, recursive calls, - and compilation of these. Functions - are specified in the @DECL region, which must appear first within a pass - file, if present.
- -New NLP++ functions can also be defined with C++ code, within an application's user - project. User-defined function calls must be preceded by the 'user' - scope qualifier, e.g., user::myfunction. - (Interpreted NLP++ will find the correct function and issue a warning, - but user functions without the scope qualifier will be compiled incorrectly.)
- -- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Grammar_Region.htm b/Help/helps/NLP_PP_Stuff/Grammar_Region.htm deleted file mode 100644 index 91511c0..0000000 --- a/Help/helps/NLP_PP_Stuff/Grammar_Region.htm +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - -
A Grammar Region is where you write NLP++ rules and actions.
- -The Grammar Region consists of one or more @RULES markers with associated - rules and optionally with associated action regions. These - action regions are the PRE Region, the CHECK Region, and the POST Region. - (See below.)
- -A RECURSE Region and the main Grammar Zone are the locations in which - a Grammar Region may appear.
- -The following "subregions" may appear within a Grammar Region, - anchored by the RULES Region:
- - -|
- REGION |
-
- DESCRIPTION |
| - | -
- Actions that represent additional conditions - on the matching of individual rule elements. NOTE: Does not allow general - NLP++ code. |
| - | -
- When a rule has matched, NLP++ code in this - region checks for self-consistency and/or builds semantic data. A rule - match may still be rejected from this region. |
| - | -
- NLP++ code that operates once a rule match - has been accepted. |
| - | -
- Contains the actual NLP++ rules. |
The end markers @@PRE, @@CHECK, @@POST, and @@RULES are optional.
- -- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Grammar_Zone.htm b/Help/helps/NLP_PP_Stuff/Grammar_Zone.htm deleted file mode 100644 index 44cb487..0000000 --- a/Help/helps/NLP_PP_Stuff/Grammar_Zone.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - -
The Grammar Zone is where you place the main rules of a pass file.
- -The Grammar Zone occurs as the last zone (or possibly the only zone) - of a pass file. Unlike - other zones, the Grammar Zone does not have a distinguishing marker.
- -The Grammar Zone contains zero or more Grammar Regions. The - Grammar Region is where rules and actions may be written.
- -If a pass file contains RECURSE Regions, then at least one rule in the - Grammar Zone must invoke a RECURSE Region to "start the ball rolling", - or no minipasses will ever be executed. See - the phrase element modifier, recurse.)
- -Since a Grammar Zone has no beginning marker, a problem can occur if - a pass file looks like:
- -@RECURSE abc
- -@RULES
- -...
- -#Intended start of Grammar - Zone.
- -@RULES
- -In the above example, the last RULES Region is understood as part of - the previous RECURSE Region, rather than as the start of the Grammar Zone. - To obtain - the right reading, the RECURSE Region terminator should be used.
- -@RECURSE abc
- -@RULES
- -...
- -@@RECURSE
- -- -
#Intended start of Grammar - Zone.
- -@RULES
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/Minipass_Zone.htm b/Help/helps/NLP_PP_Stuff/Minipass_Zone.htm deleted file mode 100644 index 76008c0..0000000 --- a/Help/helps/NLP_PP_Stuff/Minipass_Zone.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - -
The Minipass Zone is used to write zero or more nested "minipasses" - within a pass file. Each minipass is called a RECURSE Region and has an - associated name. The Grammar Region within a RECURSE Region is not executed - directly, but rather it is invoked by a recurse - element action when a rule elsewhere in the pass file has matched.
- -The idea is that a rule element, such as a wildcard, "roughs out" - a segment or phrase of nodes by matching or collecting these nodes. Then - that rule element invokes a minipass by name in order to characterize - or refine the matched phrase.
- -Typically, minipasses are invoked from rules in the main Grammar Zone - of the pass file. But matches in one RECURSE Region may lead to invoking - a second RECURSE Region.
- -Most NLP++ operators are modeled on the C programming language. The - main addition is the confidence - operator, %%. This enables convenient accumulation of evidence - in terms of percent confidence. Following is an operator precedence table, - with highest precedence at the top.
- - -|
- OPERATOR |
-
- DESCRIPTION |
-
- ASSOCIATIVITY |
|
- ++ - -- |
-
- Post increment, decrement |
-
- Left to right |
|
- ++ -- |
-
- Pre increment, decrement |
-
- Right to left |
|
- ! |
-
- Logical NOT (unary) |
-
- Right to left |
|
- + - |
-
- Unary plus, minus |
-
- Right to left |
|
- % * / %% |
-
- Remainder, multiplication, division, confidence |
-
- Left to right |
|
- + - |
-
- Addition, subtraction |
-
- Left to right |
|
- < > <= - == != >= |
-
- Relational operators |
-
- Left to right |
|
- && || |
-
- Logical AND, OR |
-
- Left to right |
|
- = |
-
- Assignment |
-
- Right to left (multiple assignment works) |
|
- *= /= += -= %%= |
-
- Shorthand assignment (unimplemented) |
-
- Right to left |
|
- << |
-
- Output operator |
-
- Left to right |
The << output operator is modeled - on the C++ operator. One form is:
- -filename - << expression << expression - .... ;
- -Example:
- -"output.txt" << "Hello, NLP++!" << "\n";
- -NOTES: - The file named by filename should have been created by a call to openfile(filename...) or a prior fileout(filename) code action. If that - hasn't been done, then the output operator will create the global variable - G(filename) with the output stream - as its value. The default output mode for the file is append, which can't - be modified by the user at present. Also, the default output directory - is the log directory for the current input file -- also not under user - control at present.
- -Say that you have 80% confidence - that you've found a name. You could write this into a global variable - as
- -G("name confidence") = 80;
- -Now - you want to account for a new piece of evidence. Say the standalone confidence - of that evidence is 70%. You could combine this as
- -G("name confidence") = G("name confidence") %% 70;
- -which - will yield a new percent confidence between 80% and 100%.
- -The %% operator guarantees that "adding" - or "subtracting" confidence will always stay within the range - of 0 to +100, providing an intuitive way to gather evidence and compare - confidences using a single scale of measurement.
- -The plus '+' operator, when given string args, serves as a built-in - string catenation operator.
- -NLP++ expressions are modeled on the C/C++ programming languages and - can be nested arbitrarily and grouped using parentheses ( - ).
- -Assignment expressions can be nested, just as in C/C++. For example
- -G("a") = G("b") = 0;
- -sets the global variables named "a" and "b" to 0.
- -- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Pass_Files.htm b/Help/helps/NLP_PP_Stuff/Pass_Files.htm deleted file mode 100644 index 0c4b960..0000000 --- a/Help/helps/NLP_PP_Stuff/Pass_Files.htm +++ /dev/null @@ -1,3470 +0,0 @@ - - - - - - - - - - -
A pass file (also called a rule file), consists of NLP++™ code and rules. - A pass file represents a single pass of a text analyzer over a parse tree. - There are two different algorithms used to traverse the parse tree: PAT - (for pattern) and REC (for recursive).
- -The PAT algorithm uses rules in a pattern-based way, traversing each - selected phrase in the parse tree only once, while the REC algorithm treats - the rules as a recursive grammar, traversing each selected phrase repeatedly - till no rules match within that phrase.
- -The pass file, which is used by a single analyzer PAT pass, consists - of sets of nonrepeating and repeating regions, which must be ordered in - a pass file as follows:
- - -|
- REGION |
-
- REPEATABLE |
-
- DESCRIPTION |
|
- Code |
-
- NO |
-
- Interpreted actions that precede the rule - matching process. |
|
- Context |
-
- NO |
-
- Specifies nodes of the parse tree. Rules will - match only against the phrases immediately under those nodes. |
|
- Minipass |
-
- YES |
-
- Recursive minipasses. Each recurse region - is named and can contain repeating rules regions. Rule elements in the - main RULES region (below) can invoke these named rule sets. |
|
- Grammar |
-
- YES |
-
- The main actions-rules regions for the current - file (i.e., the current pass). |
A pass file must contain at least a @CODE region or a main @RULES region.
- -The CODE region consists of interpreted actions that operate before - the rule matching for the current file, but only once for the current - file. Each action looks like
- -name(arg1,...argN)
- -which is identical to the syntax for PRE, CHECK, and POST actions. (PRE - actions have an additional bracketed range at the start of each such action.) - See the CODE ACTIONS section below for details about available actions. - For a particular application, the developer can create new code actions - within the application's USER project.
- -The Select Region allows the user to specify which nodes of the parse - tree to execute. The region is optional, and the default is to match the - rules of the file against the top-level phrase of the parse tree, that - is, the phrase directly under the _ROOT - node. The default could be made explicit, as in the following sample Select - Region:
- - -|
- @SELECT |
-
- # Start of Select Region |
|
- @NODES _ROOT |
-
- # Specifies nodes whose underlying phrase - will be matched against. |
|
- @@SELECT |
-
- # Optional end-marker for Select Region |
(Note that the region markers @SELECT and @@SELECT are also optional. - The sample Select Region above could be simply @NODES _ROOT.)
- -If there is more than one - @NODES - marker, or if more than one name appears after a @NODES marker, those - names are all collected into a single list. The - pattern matcher makes a single pass - through the parse tree, looking for a node from this list. If such a node - is found, the phrase under it is matched against the rules of the file. - More than one @NODES is unimplemented.
- -Instead of @NODES, one can specify the @MULTI - marker, which also takes a list of node names. This applies the - rules in the file to every - phrase in the subtree of the selected nodes, allowing multiple - matches in the subtree. Needless to say, the rule writer must be careful - in using rules with the singlet and tree keys in conjunction with the - MULTI specifier.
- - -|
- SELECT TYPE |
-
- DESCRIPTION |
|
- @NODES |
-
- Directs the pattern matching algorithm (e.g., - PAT or REC) to nodes in the parse tree. The phrase immediately under such - a node will be traversed to look for rule matches. WARNING: The pattern matcher will only - find such nodes inside a path with the unsealed - attribute set to true in all nodes of the path. |
|
- @MULTI |
-
- Directs the pattern matching algorithm (e.g., - PAT or REC) to nodes in the parse tree. The entire subtree under such - a node will be traversed to look for rule matches. |
|
- @PATH |
-
- Directs the pattern matching algorithm (e.g., - PAT or REC) to a specific path of nodes in the parse tree. The phrase - immediately under the last node in the path list will be traversed to - look for rule matches. The list must always start with the node _ROOT. - The second name in the path must be a direct child of _ROOT, the third, - a child of that, and so on. |
If one SELECT node is inside the subtree of another SELECT node, then - the one inside will not be seen - by the pattern matcher. @MULTI in combination with [s] or singlet mode - can lead to unexpected behavior, such as matching the same pattern multiple - times. Normally, you will want to avoid using [s] in rule elements when - specifying a @MULTI traversal of a parse subtree.
- -The Recurse Region allows the user to create several passes within a - single pass file. Each recurse region acts like an independent pass. But - a recurse pass can only be invoked from an element of a rule that has - matched. The phrase that the recurse pass operates on is the set of nodes - that matched the invoking rule element. Here's an example taken from the - RFA (Rules-File Analyzer), which parses the pass files themselves.
- -# Start of recurse region. A name is required.
- -@RECURSE actionpass
- -# Start of one rules region within the recurse region.
- -@RULES
- -# The pass converts literals (e.g., "single") to actions in context.
- -_ACTION <- _LIT @@
- -# End of recurse region. (@@RULES marker is optional).
- -@@RECURSE
- -# ....
- -# A main rules region.
- -@RULES
- -_POSTS [base] <- _soPOST
- -_xWILD [matches=(_LIT _ACTION) recurse=(actionpass)]
- -_eoPOST [opt] @@ # Simplified rule for @POST actions region.
- -In the above example, when the RFA sees a plain word like "single" - in a file, it doesn't know whether to reduce it to an _ACTION or not. - But within the markers @POST and @@POST, the literal should be treated - as an action. This allows the parentheses in pass file actions to be optional, - when the action takes no arguments. E.g., "single()" and "single" - are equivalent.
- -In general, RECURSE mini-passes enable - a mechanism for "roughing out" a text and then applying the - correct assignments when the context has been determined unambiguously. - They have many other uses, such as traversing nodes that matched a rule - element in order to perform cleanups, data gathering, deletions, and so - on.
- -NOTE: A Recurse Region - cannot contain a Code Region or a Select Region. A Select Region would - be meaningless, since the recurse region operates on a phrase specified - by the rule element that invokes it. A code region could be implemented - if it proves useful.
- -The main Rules Regions (that follow the Code, Select, and Recurse Regions - in a pass file), as well as the Rules Regions nested inside a Recurse - Region, must be laid out as follows:
- - -|
- SUBREGION |
-
- DESCRIPTION |
| - | -
- Additional conditions on the matching of individual - rule elements. |
| - | -
- When a rule has matched, these actions check - self-consistency and/or build semantic data. These actions can be used - to reject a rule match. |
| - | -
- Actions that operate once a rule match has - been accepted. |
| - | -
- Subregion containing the actual rules that
- are subject to immediately preceding Pre,Check, and Post subregions. |
Each region has a set of markers - for it: @PRE and @@PRE, @CHECK and @@CHECK, @POST and @@POST, @RULES and - @@RULES. The end-markers are optional. Sections below detail the particular - actions available in each category.
- -Within each Rules Subregion, any - number of rules can occur. The syntax for a rule is
- -_SUGG - <- _PHRASE @@
- -The _SUGG, or suggested rule - element is followed by the rule arrow, - then by a phrase of elements, - and finally the @@ end-mark. Each element, including the suggested element, - consists of a literal or nonliteral. Literals match tokens, - or "real text", while nonliterals match nodes with synthetic - names. A nonliteral must begin with an underscore, a literal must not - begin so.
- -Optionally, each element can be followed by a list of key=values pairs - enclosed in square brackets. Though called pairs, some keys, such as trigger, - take no values. Some special rule elements, as well as the key=value pairs - that appear in phrase and suggested elements, are listed in tables below.
- -|
- ITEM |
-
- DESCRIPTION |
|
- # |
-
- Comment. Text till the end of the line is - ignored. |
|
- AAA or NNN |
-
- Literal tokens. Completely alphabetic or completely - numeric. |
|
- _AAA |
-
- Nonliteral tokens must begin with underscore. - All the remaining letters MUST be alphabetic. (May expand to underscore,num,dash - someday.) |
|
- "XXX" |
-
- Strings get double quoted. Everything within - string taken literally (except backslashed characters). |
|
- \X |
-
- Backslash any nonalphanumeric char you want - taken literally. |
|
- \\ |
-
- Literal backslash character. |
|
- \ |
-
- At end of line, escapes end of line to NOTHING. - [Unimplemented] |
|
- \X |
-
- where X=abnrftv special escapes in C/C++. |
|
- @AAA |
-
- Reserved start-of-region markers in the pass - file (e.g., @RULES). |
|
- @@AAA |
-
- Reserved end-of-region markers in the pass - file (e.g., @@RULES). |
|
- <- |
-
- Rule arrow. |
|
- @@ |
-
- Rule terminator. |
Each punctuation character is treated as a separate entity or "token" - in the rule file, even if there is no separating space. Constructs like - _xWILD [matches=(_noun)] and _xWILD [ matches = ( _noun ) ] are parsed - identically.
- -|
- [AAA=XXX - AAA=(XXX XXX) AAA] |
-
- PAIRS. Square brackets enclose the key=value
- pairs for a rule element (phrase element or suggested element). A sample
- rule with pairs: |
|
- AAA(XXX,XXX....) |
-
- ACTION. check and post action language. |
|
- <NUM,NUM> - XXX(XXX,XXX...) |
-
- PRE ACTION. <NUM,NUM> is a range of - rule elements that must execute the action during rule matching. |
-ALL MATCHING IS CASE-INSENSITIVE. The rule-writer can add restrictive actions,
- like uppercase(), as needed. Currently, wildcard cannot appear as the
- start, end, or trigger of a rule. Optional elements cannot be triggers.
Special rule elements are given in the following table.
- - -|
- RULE - ELEMENT |
-
- DESCRIPTION |
| - | -
- Unrestricted wildcard. Key-value pairs may - add restrictions on number of nodes matched and on what is matched. (Note: - with a match or fail - list, _xWILD becomes an "OR" matching function.) |
|
- _xANY |
-
- Matches any single node. (See warning [1] - below.) |
|
- _xNIL |
-
- Designates a suggested element when the rule - performs a special action, such as removing the matched nodes from the - parse tree. (_xNIL has no special action, but serves as documentation - for the rule writer.) |
| - | -
- Matches an alphabetic token, including accented - and other extended ANSI chars. |
|
- _xCTRL |
-
- Matches control and nonalphabetic extended - ANSI characters. (see _xALPHA) |
| - | -
- Matches a numeric token. |
|
- _xPUNCT |
-
- Matches a punctuation token. |
| - | -
- Matches a whitespace token, including - newline. |
|
- _xBLANK |
-
- Matches a whitespace token, excluding - newline. Equivalent to _xWILD - [match=(\ \t)] |
|
- _xCAP |
-
- Matches an alphabetic with uppercase first - letter. |
|
- _xEOF |
-
- Matches the end of file. |
| - | -
- Matches if at the start of a phrase (or "segment"). |
|
- _xEND |
-
- Matches if at the end of a phrase (or "segment"). |
|
- KEY |
-
- VALUE |
-
- DESCRIPTION |
|
- trigger,trig, |
-
- NONE |
-
- Match the current element first. E.g., |
|
- min |
-
- NUM |
-
- Match a minimum of NUM nodes. 0 means the - current element is optional. E.g., _boys - <- the [min=0 max=1] boys @@ |
|
- max |
-
- NUM |
-
- Match a maximum of NUM nodes. 0 means the - current element can match an indefinite number of nodes. E.g., _htmltag - <- \< _xWILD [min=1 max=100] \> @@ |
|
- optional,option,opt, |
-
- NONE |
-
- Optional element. Match a minimum of 0 and - a maximum of 1 node. (Short for min=0 max=1). E.g., _vgroup - <- _modal [opt] _have [opt] _be [opt] _verb @@ |
|
- one |
-
- NONE |
-
- Match exactly one node. (Short for min=1 max=1). |
|
- star |
-
- NONE |
-
- Indefinite repetition. Match a minimum of - 0 up to any number of nodes. (Short for min=0 max=0). |
|
- plus |
-
- NONE |
-
- Indefinite repetition. Match a minimum of - 1 up to any number of nodes. (Short for min=1 max=0). |
|
- group, gp |
-
- NAME |
-
- Gather nodes that matched elt under a single - node with NAME as its name. Analogous to group post-action. |
|
- rename,ren |
-
- NAME |
-
- Rename every node that matched the current - element to NAME. E.g., _locfield <- - location \: _xWILD [ren=_location] \n @@ |
|
- singlet, |
-
- NONE |
-
- Search a node's descendants for a match. Stop - looking down when a node has more than one child or has the BASE attribute - set (see base below). E.g., _abbr <- - _unk \. [s] @@ |
|
- tree |
-
- NONE |
-
- Search node's entire subtree for a match. - (Overuse of this may degrade analyzer performance.) |
|
- matches, |
-
- LIST |
-
- For _xWILD element only. Restricted wildcard - succeeds only if one of the list names matches a node. E.g., _james - <- _xWILD [match=(jim - jimmy james) singlet min=1 max=1] - @@ |
|
- fails, |
-
- LIST |
-
- For ANY - element. Match fails if node matches anything on the list. E.g., _par <- _xWILD [fail=(_endofpar - _par) min=1 max=0] @@ |
|
- excepts, - except |
-
- LIST |
-
- For ANY element. Must be accompanied by a - single match or fail - list. Matching an item on the except list negates the effect of a match - on the match or fail list. |
|
- lookahead, - look |
-
- NONE |
-
- Designates the first lookahead element of - a rule. The first node matching the lookahead element or to the right - of it will be the locus where the pattern matcher continues - matching. WARNING: A reduce action such as singler - or noop should be used to ensure - that the lookahead node and nodes to its right are not included in the - current rule reduction. |
|
- layers, layer, |
-
- LIST |
-
- Layer additional attributes for the element - in the parse tree, as "mini-reductions". Use the names in the - list to name nodes. Note: each node that matched current rule element - will be layered. |
|
- recurse,
- nest, |
-
- LIST |
-
- Invoke a recursive rules pass on nodes that - matched the current rule element. E.g., _tag - <- \< _xWILD [nest=(tagrules)] \> @@. (See - the Recurse Region discussion.) |
WARNING:
-[1] Don't write rules with _xANY [max=0]. They won't work, because _xANY
- is not implemented as a wildcard. The nearly equivalent _xANY _xWILD works.
-
-[2] More generally, matching with MIN and MAX is greedy,
- and no backup is implemented.
- So the rule
-
- _a <- _b [min=1 max=3] _c [s] @@
fails on the phrase _b _b(subnode _c), - because the repeating _b element greedily gobbles up the second _b node. - The pattern matcher will not back up to find that the rule can be made - to work. Unrestricted _xWILD is the only - rule element that is "backup-aware".
- -|
- base |
-
- NONE |
-
- The suggested node is the bottom-most node - to search when looking down the parse tree for a match (see singlet above). - (Takes no value). |
|
- unsealed |
-
- NONE |
-
- The suggested - node will be searched for select nodes (i.e., nodes specified by @NODES). |
|
- layers |
-
- LIST |
-
- After normal reduce, perform additional reduces, - naming the nodes as in the list. This enables layering of attributes in - the parse tree. |
The code, pre, check, and post actions - listed in subsequent sections are still valid. However, a suite of general - functions that can occur in any region is being implemented, and some - of the old actions may go away or be generalized to work in any region - that allows NLP++ code. Reduction and parse tree manipulation functions - should still go in the post region, because that code executes when a - rule match is deemed to be successful. The check region may be folded - into the post region, since NLP++ functions can be implemented to pronounce - that a rule match has succeeded or failed. The pre region still does not - allow general NLP++ expressions. NLP++ functions are described - in the NLP++ and Knowledge Base help pages.
- -WARNING: Many of the old-style actions are not recognized by the compiled - analyzer engine. Use NLP++ expressions wherever possible, rather than - the old hard-wired actions. Compiling with MS Visual C++ points out which - functions are invalid. The documentation below also marks old-style actions - slated to be removed from NLP++.
- -Code actions and rule - actions (pre, check and post) - are meant to work together in many cases. The code region in a file operates - before any rule-matching is invoked, so that is where the user should - initialize variables and perform other functions, such as printouts that - are independent of any rule.
- -There are three output modes: (1) - output to standard output, (2) output to a file named in the actions themselves, - and (3) output to the "main output file" (default name output.txt) that is set by the environment that calls - the analyzer. Then we throw into the mix actions that print in the code - region as well as actions that print when a rule matches.
- -Rather than have three types of output - (or "print") actions, we maintain two: actions that take a file - argument and equivalents that do not. By default, output actions that - take no file argument print to standard output. However, when delimited - by the code actions startout() and stopout(), these actions print to the main output - file, rather than standard output. If print actions in the rules are also - to write to the main output file, then the stopout() action must be placed in the code region - of a subsequent pass.
- -For output actions with a filename - argument, the file must have been previously declared with a fileout() - action.
- -Output is complex, but to allow the - analyzer developer as much flexibility as possible, we must support many - modes.
- -Code actions are not tied to any - rule, but execute operations for the entire pass. They are placed within - the @CODE and @@CODE markers at the head of the file, called the code region. There is only one such region per file, - and its actions operate before the pattern matching of the rules in the - file. This region represents an embryonic programming language that enables - the analyzer developer to perform useful tasks without having to write - and compile regular programming language code.
- -Code actions operate before - the rules in the file operate on the parse tree. At present, there is - no "post code" region to execute actions after the rules for a pass have matched. The user - must place such code actions in a subsequent analyzer pass.
- -NLP++ is now valid in the code region.
- -Variable names must be strings, at - present.
- -A. VARIABLE ACTIONS
- - -|
- ACTION(ARG1,ARG2...) |
-
- DESCRIPTION |
|
- var(varname,str) |
-
- Create global - variable with name varname and - initial value str. If str2 is - all numeric, then the code action inc() - can increment the value of the variable (this implements a counting variable). - (Old-style. Use NLP++) |
|
- varstrs(varname) |
-
- Create an empty multi-string-valued global variable with name varname. - The post action addstrs() adds - values to this type of variable. |
|
- sortvals(varname) |
-
- Sort the strings in multi-string-valued global variable varname. |
|
- gtolower(varname) |
-
- Convert the strings in multi-string valued - global variable to lower case. |
|
- guniq(varname) |
-
- Remove redundancies in a sorted, multi-string - valued global variable. |
|
- lookup(var,file,flag) |
-
- Specialized word lookup. Global - variable var - has multiple words as values. file - is a file of strings, one per line. flag - tells which bit-flag of the word's symbol table entry to modify. E.g., - lookup("Words", "dict.words", - "word") looks up all the values in the Words - variable in the dict.words file - and modifies the word bit-flag - (which says whether the word is a proper English word). |
B. PRINT ACTIONS
- - -|
- print(str) |
-
- Print str to the standard output (usually - the console or DOS window). (See startout - below). |
|
- printvar(var) |
-
- Print the values of the global - variable named var to standard - output. (See startout - below). |
|
- fprintvar(file, - var) |
-
- Print the values of the global - variable named var to file. |
|
- prlit(file, - str) |
-
- Print the literal string str - to file. |
|
- gdump(filename) |
-
- Dump the all the global variables and their - values to the given filename. |
|
- fileout(file) |
-
- Open file - for appending. File becomes a - variable useable in print actions with a file argument, e.g. prlit(). |
|
- startout(0) |
-
- Divert standard output to the main output - file, set by the caller of the analyzer (default is output.txt). |
|
- stopout(0) |
-
- Stop diverting standard output to the main - output file. Subsequent file-less output is to standard output. |
- -
Pre actions extend the pattern matcher's - mechanism for matching each rule element. Unlike other actions, pre actions - have a mandatory range. Their form is
- -<num,num> - pre_action_name(args....)
- -The pre action applies to each rule - element in the <num, num> range individually.
- -Pre actions operate only on tokens, - or leaf nodes of the parse tree, at present. So, if the current node covers - more than a single leaf node, the pre action automatically - fails. Another thing to be careful of is that - pre actions disregard the base attribute of a node. That is, even if the - current node or a subnode has the base attribute set, the pre action will look - under it for the leaf node.
- - -|
- uppercase() |
-
- Succeed if leaf token is all-uppercase. |
|
- lowercase() |
-
- Succeed if leaf token is all-lowercase. |
|
- cap() |
-
- Succeed if leaf token has capitalized first - letter. |
|
- length(num) |
-
- Succeed if leaf token has length exactly equal - to num. |
|
- lengthr(num1,num2) |
-
- Succeed if leaf token length is in the range - of lengths (num1,num2), inclusive. |
|
- numrange(num1,num2) |
-
- Succeed if leaf token is numeric in the given - range. |
|
- unknown() |
-
- Succeed if leaf token is an unknown word. - Meaningful only if a prior pass has performed lookup() - code action. |
|
- debug() |
-
- Succeed unconditionally. Used to place a C++ - breakpoint at a particular rule. |
Check actions apply after the pattern - matcher has succeeded in matching a rule. These represent the final opportunity - to reject the rule match based on inconsistencies spanning more than one - rule element. For example, before accepting a noun-phrase rule, we could - check for agreement between the determiner and noun (e.g., accept "this - company" but reject "these company").
- -See the section on NLP++ for a more - generalized way to express conditions in the Check region.
- - -|
- or(num1,num2) |
-
- Succeed if any of the rule elements from num1 to num2 - has matched an actual node. Meaningful only if this is a range of optional rule elements. (This action - is just a sample. As Text Analysis International™ develops its generic analyzer, more check actions will - be implemented.) |
Post actions execute after the pattern - matcher has successfully matched a rule and the match is accepted.
- -|
- single() |
-
- Single-tier reduce. Reduce the entire set - of nodes that matched a rule phrase. |
|
- singler(num1,num2) |
-
- Single-tier reduce of a range of rule elements. - eg, if finding a period to be end-of-sentence in context, we only want - to reduce the period to end-of-sentence, not the whole context. |
|
- singlex(num1,num2) |
-
- Single-tier reduce of a range of rule elements. - All nodes not in the range are EXCISED. eg, if matching a keyword html - tag, we only want to reduce the keywords and to zap the rest of the tag. |
|
- singlezap() |
-
- Single-tier reduce. Excise all the nodes in - the matched phrase. |
|
- merge() |
-
- Single-tier reduce that DISSOLVES each top-level - node in the matched phrase. |
|
- merger(num1,num2) |
-
- Single-tier reduce that DISSOLVES each top-level - node in the matched range. |
|
- listadd(olist,oitem - [, keep]) |
-
- Add a new node to a list node's children. - If the item occurs after the list (olist - < oitem), - it is added as the last child. If the item occurs before the list, it - is added as the first child. The optional keep arg can be "true" - or "false". If "true", it keeps the nodes between - the list and the item as children of list. If "false", it excises - all the intervening nodes. |
|
- excise(num1,num2) |
-
- Excise the nodes matching the range of elements - from the parse tree. For multiple excise actions, operations must be ordered - such that the highest number is listed first in the operation. |
|
- splice(num1,num2) |
-
- DISSOLVE the top level nodes of given range. - [NOT TESTED whether a reduce such as single can follow this action.] |
|
- xrename(name - [, num]) |
-
- Rename the numth - context node to name. - If num is - absent or 0, rename last context node. |
|
- setbase(num, - bool) |
-
- Set the BASE attribute of the numth - node to "true" or "false". |
|
- setunsealed(num, - bool) |
-
- Set the UNSEALED attribute of the numth - node to "true" or "false". |
|
- group(num1,num2,label_str) |
-
- Reduce the range of rule elements (num1,num2) - and name the group node label. - Unlike other reduce actions, this one can be repeated. WARNING: - The rule element numbers change after each group action, so subsequent - post actions must account for the new numbering of the rule elements. - Reimplemented as an NLP++ function so that args can be NLP++ expressions. |
|
- noop(0) |
-
- Perform no post action. This is a convenience - to disable the default single() - reduce action. |
Code actions and Post actions have distinct sets of printing actions, - though we've made them as similar as possible.
- - -|
- print(str) |
-
- Print the literal string str - to standard output. |
|
- printr(num1,num2) |
-
- Print the text for the rule element range - from num1 to num2 - to standard output. |
|
- prchild(file, - num, name) |
-
- Look for name - immediately under the node matching rule element num. - Print its text to file, if found. |
|
- prtree(file, - num, name) |
-
- Look for name - anywhere under the node matching rule element num. - Print its text to file, if found. |
|
- prxtree(filename, prestr, |
-
- To the filename, - print the first node called name - found in the ordth element's tree, - preceded by prestr and followed - by poststr. If named node is not - found, nothing is printed out. E.g., prxtree("out.txt", "date: - ", 3, "_date", "\n") prints out a line like "date: - 3/9/99 <cr>" if a _date node is found within the subtree of - elt 3. |
|
- prlit(file, - str) |
-
- Print the literal string str - to file. |
|
- fprintnvar(file, - var, ord) |
-
- To the file, - print the value of the variable var - in the ordth element's node. |
|
- fprintxvar(file, - var, ord) |
-
- To the file, - print the value of the variable var - in the ordth context node. |
|
- fprintgvar(file, - var) |
-
- To the file, - print the value of the global variable var. |
|
- gdump(file) |
-
- Dump all the global variables and their values - to file. |
|
- xdump(file, - ord) |
-
- Dump all the variables in the ordth - context node and their values to file. |
|
- ndump(file, - ord) |
-
- Dump all the variables in the ordth - phrase element's node and their values to file. |
|
- sdump(file) |
-
- Dump all the variables in the suggested node - and their values to file. |
|
- prrange(file, - num1,num2) |
-
- Print the text under a range of rule elements - (num1,num2) to - file. |
|
- pranchor(file,num1,num2) |
-
- Print a web URL to file. - Treat the range (num1,num2) as - a URL. Use the global variable named Base - to resolve and print complete relative URLs. (a prior pass must find the - <base> HTML tag and set Base - appropriately. NOT yet using the file's URL, so not handling cases where - <base> itself is a relative URL.) |
- -
|
- addstrs(var,num) |
-
- Add a string to the multi-string global - variable var. Fetch the string - from the nodes matching rule element num. - var should have been declared - using the code action varstrs(). - (No NLP++ equivalent yet.) |
A batch of post actions for the RFA - (Rules-File Analyzer) are not described, as they are not relevant to the - VisualText™ user. Their names - all begin with the prefix RFA.
- -- - - - diff --git a/Help/helps/NLP_PP_Stuff/Phrase_element_modifiers.htm b/Help/helps/NLP_PP_Stuff/Phrase_element_modifiers.htm deleted file mode 100644 index 8ce7b0e..0000000 --- a/Help/helps/NLP_PP_Stuff/Phrase_element_modifiers.htm +++ /dev/null @@ -1,772 +0,0 @@ - - - - - - - - - - -
Element modifiers that can be used in a rule's phrase are listed in - the table below. The element modifier must be enclosed in square brackets [ ] and placed after - the element. Some element modifiers have synonyms. The - modifier trigger, for example can be written as [trigger], - [trig], or [t]. -
- - -|
- KEY |
-
- VALUE TYPE |
-
- DESCRIPTION |
|
- deaccent, deacc, da |
-
- NONE |
-
- Match alphabetic, ignoring presence or absence - of accent marks on characters. NEW - IN VERSION 2. |
| - | -
- NONE |
-
- Match the current element first. E.g., |
| - | -
- NUM |
-
- Specify the minimum number of nodes to match. - 0 means - the current element is optional. E.g., _boys - <- the [min=0 max=1] boys @@ |
| - | -
- NUM |
-
- Specify the maximum number of nodes to match. - 0 means - the current element can match an indefinite number of nodes. E.g., _htmltag <- \< _xWILD [min=1 max=100] - \> @@ |
| - | -
- NONE |
-
- Match a minimum of 0 and a maximum of 1 node. - (Short for min=0 max=1). E.g., _vgroup - <- _modal [opt] _have [opt] _be [opt] _verb @@ |
| - | -
- NONE |
-
- Match exactly one node. (Short for min=1 max=1). |
| - | -
- NONE |
-
- Indefinite repetition. Match a minimum of - 0 up to any number of nodes. (Short for min=0 max=0). |
| - | -
- NONE |
-
- Indefinite repetition. Match a minimum of - 1 up to any number of nodes. (Short for min=1 max=0). |
| - | -
- NAME |
-
- Gather nodes that matched the current element - under a single node with NAME as its name. Analogous to POST Action group. |
| - | -
- NAME |
-
- Rename every node that matched the current - element to NAME. E.g., _locfield <- - location \: _xWILD [ren=_location] \n @@ |
| - | -
- NONE |
-
- Search a node's descendants for a match. Stop - looking down when a node has more than one child or has the BASE attribute - set. E.g., _abbr <- _unk \. [s] - @@ See - BASE. |
| - | -
- NONE |
-
- Search node's entire subtree for a match. - (Overuse of this may degrade analyzer performance.) |
| - | -
- LIST |
-
- For _xWILD element only. Match if element - is in a match list. Used as a restricted wildcard and succeeds only if - one of the list names matches a node. E.g., _james - <- _xWILD [match=(jim - jimmy james) singlet min=1 max=1] - @@ |
| - | -
- LIST |
-
- For ANY - element. Fail to match if node matches anything on the list. E.g., _par <- _xWILD [fail=(_endofpar - _par) min=1 max=0] @@ |
| - | -
- LIST |
-
- For _xWILD only. Matching an item on the except - list negates the effect of a match on the match - or fail list. Must - be accompanied by a single match - or fail list. |
| - | -
- NONE |
-
- Designate the first lookahead element of a - rule. The first node matching the lookahead element or to the right of - it will be the locus where the rule matcher continues - matching. WARNING: A reduce action such as singler - or noop should be used to ensure - that the lookahead node and nodes to its right are not included in the - current rule reduction. |
| - | -
- LIST |
-
- Layer additional attributes for the element - in the parse tree, as "mini-reductions". Use the names in the - list to name nodes. Note: each node that matched current rule element - will be layered. (These - modifiers can also be used as suggested element modifiers.) |
| - | -
- LIST |
-
- Invoke a recursive rules pass on nodes that - matched the current rule element. E.g., _tag - <- \< _xWILD [nest=(tagrules)] \> @@. (See RECURSE - Region.) |
|
- WARNING: - -
fails on the phrase _b _b(subnode _c), because the repeating - _b element greedily gobbles up the second _b node. The rule matcher will - not back up to find that the rule can be made to work. Unrestricted _xWILD - is the only rule element that - is "backup-aware". |
Each rule element can be followed by optional - element modifiers. Element - modifiers can be used for both - the suggested element (_SUGG) - and the phrase of elements (_PHRASE) - on the right-hand side of a rule.
- -Element modifiers place constraints on how elements in a rule are matched. - For example, if you want to specify that the rule matcher should match - a specific element in the phrase of elements on a rule's right-hand side - first, you would use the trigger - element modifier with the rule element.
- -The modifier must be enclosed in square - brackets [ - ] after the element. The element modifier is made - up of a key (the modifier name itself) and sometimes - a value. A value can be a parenthesized list, a name - or number. Some element modifiers do not have values. Some examples follow:
- -_xWILD [s one match=(_adj _noun \n)]
- -hello [rename=_hello]
- -For a list of element modifiers used with the suggest rule element, - see Suggested Element Modifiers. - For a list of element modifiers for the phrase of elements, see Phrase - Element Modifiers.
- - -|
- WARNING: When - writing lists for an element modifier, we recommend not enclosing them - in double quotes, since they are not treated as strings. E.g., write [match=(_adj _adv)] rather than [match=("_adj" - "_adv")]. |
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Rule_syntax.htm b/Help/helps/NLP_PP_Stuff/Rule_syntax.htm deleted file mode 100644 index 9695ba8..0000000 --- a/Help/helps/NLP_PP_Stuff/Rule_syntax.htm +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - -
All rules are written in the RULES - Region of a pass file. Within each RULES Region, any number of rules can - occur.
- -The syntax for a rule is
- -_SUGG - <- _PHRASE @@
- -_SUGG, is referred to as the - suggested - rule element. It is the node that is created if a rule matches. - _SUGG is often referred to as the left-hand side of the rule.
- -_PHRASE is the phrase - of elements that the rule matcher is trying to match. If the rule - matcher finds a match for the listed phrase, the node will suggest - or reduce to what is specified - in _SUGG. _PHRASE is referred to as the right-hand side of the rule.
- - -|
- Note: - Rule elements that make up the phrase of elements do not have to be written - on the same line. That is, the rule can extend over several lines with - each rule element in _PHRASE occupying its own line. The - two rules below are equivalent: -_XYZ <- _ABC _DEF - @@ -- _XYZ <- -_ABC -_DEF -@@ -When each rule element in the phrase is written - on its own line, the rule is said to be written in standard - rule format. For - more information on rule formats, see Standard - Rule Format. |
<- is the rule arrow. It - divides the rule between the suggested element and the phrase of rule - elements.
- -@@ indicates the end of a rule. - Rules must always end in the @@ marker.
- -Each rule element, including the suggested element, consists of a literal or a nonliteral. - What gets matched for each is different:
- -Literals - match tokens, or "real text".
Nonliterals - match nodes which begin with an underscore.
A literal is a terminal node - (or leaf node) in the parse tree. It represents words, numbers and punctuation.
- -A nonliteral is a nonterminal node - (also called an internal node). It represents a node which dominates other - nodes.
- -The initial underscore character "_" is an NLP++ convention - marking nonterminal or internal nodes. A terminal node cannot begin with - an underscore character.
- -NLP++ has a set of predefined rule elements called special - rule elements. These rule elements match various types of tokens - such as alpha characters, punctuation, wildcards, etc.. They have properties - that make writing rules easier. For a list of these predefined rule elements, - see Special Rule Elements.
- -Each rule element can be followed by optional - element modifiers. This - includes the suggested element - and phrase of elements on a rules - right-hand side.
- -Element modifiers place constraints on how elements in a rule are matched. - For example, if you want to specify that the rule matcher should match - a specific element in the phrase of elements on a rule's right-hand side - first, you would use the trigger - element modifier with the rule element. Element modifiers can be used - for both the suggested element - and the phrase of elements on the right-hand side of a rule.
- -The modifier must be enclosed in square - brackets [ - ] after the element. The element modifier is made - up of a key (the modifier name itself) and sometimes - a value. A value can be a parenthesized list, a name - or number. Some element modifiers do not have values. Some examples follow:
- -_xWILD [s one match=(_adj _noun \n)]
- -hello [rename=_hello]
- -For a list of element modifiers used - with the suggest rule element, see Suggested - Element Modifiers. For a list of element modifiers for the phrase - of elements, see Phrase Element - Modifiers.
- - -|
- WARNING: When - writing lists for an element modifier, we recommend not enclosing them - in double quotes, since they are not treated as strings. E.g., write [match=(_adj _adv)] rather than [match=("_adj" - "_adv")]. |
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Special_Variables.htm b/Help/helps/NLP_PP_Stuff/Special_Variables.htm deleted file mode 100644 index 4172706..0000000 --- a/Help/helps/NLP_PP_Stuff/Special_Variables.htm +++ /dev/null @@ -1,1215 +0,0 @@ - - - - - - - - - - -
To get useful information from the parse tree and other sources when - analyzing a text, some special variable names have been provided. All - start with a dollar sign ($). - No such variable names are usable with suggested (S) - variables, at present.
- -Special variable - names must be quoted. E.g., N("$text", 2).
You should - not assign to or create your own "dollar" variables. NLP++ reserves - all variable names that start with a dollar sign.
These special variables have been organized into the following four - groups:
- -File Variables
Letter Case Variables
Test Variables
A consolidated table of NLP++ special variables is provided below. Each - item in the table is also detailed in individual topics in the Special - Variables section.
- -|
- VARIABLE NAME |
-
- VARIABLE TYPES |
-
- DESCRIPTION |
|
- $treetext |
-
- N, X |
-
- Fetch the 'cleaned up' (removing leading and - trailing, convert separators to single space) text gleaned from a node's - subtree. Uses the parse tree as input, not text buffer. Analogous to $text. - Difference between $treetext and $text is $text returns text from the - input text buffer while $treetext returns text from the parse tree. So, - if you have removed some nodes from a tree with an excise(), $treetext - returns the text minus the excised elements, while $text returns everything - in the input text buffer, including the text under excised nodes. |
|
- $text |
-
- N, X |
-
- Fetch the text covered by the node. Cleanup - whitespace (removing leading and trailing, convert separators to single - space). Uses the original text buffer, rather than the subtree under the - node, in order to gather text. See also $treetext and $treeraw. |
|
- $treeraw |
-
- N, X |
-
- Fetch the text covered by the node from the - parse tree. Text is not 'cleaned up'. Analogous to $treetext. See also - $treetext and $raw. |
|
- $raw |
-
- N, X |
-
- Fetch the 'cleaned up' text covered by the - node from the text buffer. See also $treetext, $treeraw and $text. |
|
- $xmltext |
-
- N, X |
-
- Same as $raw, but converts characters - that are special to HTML and XML. E.g., "<" is converted - to "<". |
|
- $length |
-
- N, - X |
-
- Get the length of node's - text. |
|
- $ostart |
-
- N, X |
-
- Start offset of the referenced node in the - input text. |
|
- $oend |
-
- N, X |
-
- End offset of the referenced node in the input - text. |
|
- $start |
-
- N, X |
-
- Check if referenced node has left sibling - in parse tree. Evaluates to 1 if - the referenced node has no left sibling, else 0. |
|
- $end |
-
- N, X |
-
- Check if referenced node has right sibling in parse tree. - Evaluates to 1 if referenced node - has no right sibling, else 0. |
|
- $apppath |
-
- G |
-
- Get base directory path for current application. - E.g., "D:\dev\apps\Resume". |
|
- $anaspath |
-
- G |
-
- Get parent directory for the analyzers. - NEW 2.1.0 |
|
- $kbpath |
-
- G |
-
- Get base directory path for the kb / user directory. - E.g., "D:\dev\apps\Resume\kb\user". - NEW 1.27.0 |
|
- $input |
-
- G |
-
- Get full input file. E.g., "D:\apps\Resume\input\Dev1\rez.txt" |
|
- $inputparent |
-
- G |
-
- $inputparent returns "Dev1" assuming input file is "D\apps\Resume\input\Dev1\text.txt". - NEW 1.26.0 |
|
- $inputpath |
-
- G |
-
- Get input file path. E.g., "D:\apps\Resume\input\Dev1" |
|
- $inputname |
-
- G |
-
- Get input file name. E.g., "rez.txt" |
|
- $inputhead |
-
- G |
-
- Get input file head. E.g., "rez" |
|
- $inputtail |
-
- G |
-
- Get input file tail. E.g., "txt" |
|
- $passnum |
-
- G |
-
- Get current pass number. NEW - 2.0.2.4 |
|
- $rulenum |
-
- G |
-
- Get current rule number within current pass. - NEW 2.0.2.4 |
|
- $isdirrun |
-
- G |
-
- Check if the engine is processing a directory of files instead of an individual file. Returns 1 if it is analyzing a directory, else 0. - NEW 1.26.0 |
|
- $isfirstfile |
-
- G |
-
- Check if is first file processed in a directory. Returns 1 if it is the first file, else 0. - NEW 1.24.0 |
|
- $islastfile |
-
- G |
-
- Check if is last file processed in a directory. Returns 1 if it is the last file, else 0. - NEW 1.24.0 |
|
- $allcaps |
-
- N |
-
- Check if token underlying node is all uppercase. - Returns - 1 if token is all uppercase. If multiple words (even if all are all-caps), - returns 0. WARN: Not identical to the uppercase() PRE Action. |
|
- $lowercase |
-
- N |
-
- Check if token underlying node is all lowercase. - Returns 1 if token is all lowercase If multiple words (even if all are - all-caps), returns 0. WARN: Not identical to the lowercase() PRE Action. |
|
- $cap |
-
- N |
-
- Check if token underlying node is a capitalized - word. Returns 1 if token is a capitalized word. WARN: Not identical to - the cap() - PRE Action. |
|
- $mixcap |
-
- N |
-
- Check if token underlying node is a mixed-capitalized - word. Returns 1 if token is a mixed-capitalized word. Examples: "MIchigan", - "abcD". |
|
- $exists |
-
- N |
-
- Check if node exists in parse tree. Returns - 1 if node exists, else 0. |
|
- $unknown |
-
- N |
-
- Check if token underlying node is an unknown - word. Returns 1 if token underlying node is unknown. WARN: Not identical - to the unknown() - PRE Action. Requires a lookup() - CODE Action prior to any use of this special variable. |
|
- Notes: - The $uppercase, $lowercase, $cap, and - $unknown differ from the analogous PRE Actions in that they all traverse - down to the "leafiest" node they can find, in order to perform - their check. The corresponding PRE Actions only chain down if the [s] - flag is present in the associated phrase element(s). Also, the $ variables - are not stopped by a [base] attribute in a node. |
NLP++ has a set of predefined rule elements that make writing rules - easier. These - special rule elements match various - types of tokens such as alpha characters, punctuation, wildcards, etc. - For examples - of these special rule elements, refer to the individual pages included - in the Special Rule Elements section.
- -Special rule elements are given in the following table.
- - -|
- RULE - ELEMENT |
-
- DESCRIPTION |
| - | -
- Match anything. _xWILD - is an unrestricted wildcard. Key-value pairs may add restrictions on number - of nodes matched and on what is matched. (Note: with a match - or fail list, _xWILD becomes - an "OR" matching function.) |
| - | -
- Match any single node. (WARNING: A - rule written with _xANY [max=0] will not work. _xANY - is not implemented as a wildcard. Instead, - the near equivalent _xANY _xWILD should be used.) |
| - | -
- Match nothing. _xNIL - designates a suggested element when the rule performs a special action, - such as removing the matched nodes from the parse tree. (_xNIL has no - special action, but serves as documentation for the rule writer.) |
| - | -
- Match an alphabetic token, including accented - and other extended ANSI chars. |
| - | -
- Match control and nonalphabetic extended ANSI - characters. (See _xALPHA.) |
| - | -
- Match a numeric token. |
| - | -
- Match a punctuation token. |
| - | -
- Match a whitespace token, including - newline. |
| - | -
- Match a whitespace token, excluding - newline. Equivalent to _xWILD - [match=(\ \t)] |
| - | -
- Match an alphabetic with uppercase first letter. |
| - | -
- Match an alphabetic consisting of a single - capitalized letter. NEW |
| - | -
- Match an alphabetic consisting of a single - letter. NEW |
| - | -
- Match the end of file. |
| - | -
- Match if at the start of a phrase (or "segment"). |
| - | -
- Match if at the end of a phrase (or "segment"). |
Phrase
- Element Modifiers
-Suggested Element Modifiers
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Statements_and_blocks.htm b/Help/helps/NLP_PP_Stuff/Statements_and_blocks.htm deleted file mode 100644 index bf1749c..0000000 --- a/Help/helps/NLP_PP_Stuff/Statements_and_blocks.htm +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - -
NLP++ expressions can be treated as statements by terminating them with - a semicolon.
- -This too is modeled after the C programming language. Curly braces { and } - delimit blocks of statements. Statements should end with a semicolon (;). A statement can be an arbitrary - expression, a block, or fully nested if-else - statements.
- -Assignment is treated as an expression rather than as a statement. As - in C/C++, assignments can be chained.
- -NLP++ supports if-else statement syntax identical to C/C++.
- -The only loop construct currently supported is the while - loop. Here's an example that prints out 0 thru 9:
- -G("counter") = 0;
-G("loop_limit") = 10;
-while( G("counter") < G("loop_limit")) {
-"output.txt" << "Loop counter = " << G("counter") << "\n";
-G("counter")++;
-}
- -
- -
- -
- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Suggested_element_modifiers.htm b/Help/helps/NLP_PP_Stuff/Suggested_element_modifiers.htm deleted file mode 100644 index d3da221..0000000 --- a/Help/helps/NLP_PP_Stuff/Suggested_element_modifiers.htm +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - -
Element modifiers for the suggested element are listed in the - table below. The element modifier must be enclosed in square brackets [ ] and placed after the element. The element - modifier layers has several synonyms, - layer, attrs and attr.
- - -|
- KEY |
-
- VALUE TYPE |
-
- DESCRIPTION |
| - | -
- NONE |
-
- The suggested node is the bottom-most node - to search when looking down a singlet - chain for a match. See also the singlet - modifier. |
| - | -
- NONE |
-
- The suggested - node will be searched for select nodes (i.e., nodes specified after @NODES - marker). |
| - | -
- LIST |
-
- After normal reduce, perform additional reduces, - naming the nodes as in the list. This enables layering of attributes in - the parse tree. |
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Tokens.htm b/Help/helps/NLP_PP_Stuff/Tokens.htm deleted file mode 100644 index 7ec83a8..0000000 --- a/Help/helps/NLP_PP_Stuff/Tokens.htm +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - -
Following are some token types that occur in NLP++ code.
- - -|
- ITEM |
-
- DESCRIPTION |
|
- # |
-
- Comment. Text till the end of the line is - ignored. |
|
- AAA or NNN |
-
- Literal tokens. Completely alphabetic or completely - numeric. |
|
- _AAA |
-
- Nonliteral tokens must begin with underscore. - All the remaining letters MUST be alphabetic. Currently, only alphabetics - are allowed after the initial underscore. |
|
- "XXX" |
-
- Strings get double quoted. Everything within - string taken literally (except backslashed characters). |
|
- \X |
-
- Backslash any nonalphanumeric char you want
- taken literally. |
|
- \\ |
-
- Literal backslash character. |
- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/Variable_types.htm b/Help/helps/NLP_PP_Stuff/Variable_types.htm deleted file mode 100644 index a86c16e..0000000 --- a/Help/helps/NLP_PP_Stuff/Variable_types.htm +++ /dev/null @@ -1,545 +0,0 @@ - - - - - - - - - - -
NLP++ data types are shown in the following table.
- -Numeric overflow and underflow are not flagged. For - example, the maximum int is 2147483647 - in Windows and must be checked by the programmer as needed. For - large numbers, the float type - should be used.
- - -|
- NAME |
-
- ABBREVIATION |
-
- CHARACTERISTICS |
| - | -
- STR |
-
- Sequence of characters: e.g., G("name") - = "w3c"; |
| - | -
- INT |
-
- 32-bit integers: e.g., G("num") - = 32776; |
| - | -
- FLOAT |
-
- 32-bit floating point numbers: e.g., G("flt") = 123.456; |
| - | -
- BOOL |
-
- 1 or 0. (Boolean implemented as a numeric - nonzero for true and the numeric 0 for false.) |
| - | -
- OSTREAM |
-
- Output stream. G(filename) << expr; - prints by referring to the ostream value of G(filename). - See the openfile - NLP++ function. |
| - | -
- CON |
-
- Concepts are the main object in the knowledge - base. They have string names, and optionally have one or more attributes. - e.g. G("myConcept") = makeconcept(G("root"),"My - Name"); |
| - | -
- ATTR |
-
- Attributes are associated with concepts and - KB nodes. They have string names, and optionally have one or more values. - e.g. G("myAttribute") = addattr(G("myConcept"),"is"); |
| - | -
- VAL |
-
- Values are the values of KB attributes. They - can be strings, numerics, or concepts: e.g. addconval(G("myConcept"), - "is", "John Smith"); |
| - | -
- PHR |
-
- A phrase is a sequence of nodes owned by a - single concept. E.g., create the first node of a phrase: G("USPhrase") - = makephrase(G("US"),"United"); Add - the last node of the phrase: addcnode(G("US"), - "States"); |
| - | -
- NODE |
-
- Node in the KB. Differs from a concept in - that it is not in the KB hierarchy, but rather in a concept's phrase. - A node serves as a "proxy" or "instance" of a concept. |
| - | -
- ARRAY |
-
- The values of an array, or multi-valued variable, - can be any simple values. Note - that nested ARRAY types are not currently supported. |
| - | -
- PNODE |
-
- Parse tree node. Unrelated to a KB node. |
NLP++ can also reference the nodes of a parse tree directly. For example, - N(2) refers to the (first) node - that matched the 2nd element of a rule's right-hand-side phrase. X(3) refers to the 3rd node in the current - context path as specified by @PATH. These constructs are used in functions - that deal with the parse tree. For - more information on parse tree functions, see Parse - Tree Functions.
- - -|
- Note: - Knowledge base nodes are unrelated to parse tree nodes. The former are - called NODE and the latter PNODE. |
See Special - Node References for more on referencing parse tree nodes.
- -Arrays can consist of combinations of simple types. Nested array types - are not implemented. An example follows.
- -# Create an array and step through it.
-G("counter") = 0;
-G("array_size") = 10;
-# Arrays can optionally be "declared" by padding them with 0.
-G("int_array")[G("array_size") - 1] = 0;
-
-while ( G("counter") < G("array_size") ) {
-G("int_array")[G("counter")] = G("counter");
-"output.txt" << G("int_array")[G("counter")] << "\n";
-G("counter") ++;
-}
-# print it out all at once
-"output.txt" << G("int_array") << "\n";.
-# copy it all at once:
-G("another_array") = G("int_array");
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/NLP_PP_Stuff/pncopyvars_action.htm b/Help/helps/NLP_PP_Stuff/pncopyvars_action.htm deleted file mode 100644 index 69fadb8..0000000 --- a/Help/helps/NLP_PP_Stuff/pncopyvars_action.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - -
See pncopyvars - in the Functions section.
- - - - diff --git a/Help/helps/NLP_PP_Stuff/today_format.htm b/Help/helps/NLP_PP_Stuff/today_format.htm deleted file mode 100644 index 2d924f2..0000000 --- a/Help/helps/NLP_PP_Stuff/today_format.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - -See today in the - Special Functions section.
- - - - diff --git a/Help/helps/NODES.htm b/Help/helps/NODES.htm deleted file mode 100644 index 96fb59f..0000000 --- a/Help/helps/NODES.htm +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - -The NODES Selector allows you to specify a list - of node names to be searched for independently in the parse tree. The - phrase immediately under such a context node will be traversed to look - for rule matches.
- -Below are some cautionary notes on using the NODES Selector.
- -The selection algorithm will only find such a node when all of its ancestors - have the unsealed attribute set.
- -Example: - Say in one pass you have a rule
- -_paragraph <- _sentence [s plus] @@
- -and in the next pass you try to match within the _sentence nodes as - follows:
- -@NODES _sentence
- -_np <- _det [s star] _quan [s star] _adj [s star] _noun [s plus] - @@
- -When you run this analyzer on a text, the rule creating an _np (i.e., - noun phrase) will never apply, assuming all sentences are within paragraphs. - The reason is because _paragraph nodes are sealed, - that is, they don't have the unsealed - attribute set. In order for the second pass to succeed, the rule in the - first pass must be written as
- -_paragraph [unsealed] <- _sentence [s plus] @@
- -Having NODES look only within unsealed contexts enables you to build - more efficient analyzers. The idea is that you will flag "roughed - out" segments as unsealed, so that you may characterize them further - later on. But this mechanism may sometimes have you scratching your head - as to why a rule didn't match.
- -If one context node is inside the subtree of another context node, then - the buried one will not be seen - by the selection algorithm.
- -With NODES as the selector in a pass file, it is usually a mistake to - write expressions such as X(2) or X("varname", 3). That is because - these variables refer to the second and third node, respectively, when - traversing down a parse tree path, - starting at the root node. That is, they are appropriate for use with - the PATH Selector.
- -Because the names in a NODES Selector are independent of each other, - you will, in general, not know the distance of the current context node - from the root of the parse tree. So, in this case, the correct variables - are X() and X("varname"), which refer to the current context - node selected by NODES.
- -- -
- - - - diff --git a/Help/helps/New_in_Current_Version.htm b/Help/helps/New_in_Current_Version.htm deleted file mode 100644 index 497dced..0000000 --- a/Help/helps/New_in_Current_Version.htm +++ /dev/null @@ -1,1010 +0,0 @@ - - - - - - - - - - -
[1] VisualText - executables. Version 2.0.1.X and later include both Unicode and - non-Unicode (or ANSI) executables.
- -bin\VisualText.exe Non-Unicode
- ANSI version
-bin\VisualTextU.exe Unicode
- BETA version (only works with Unicode input files)
With 2.1.0.0 and later, the following is also supplied:
- -bin\VisualTextQ.exe - Non-Unicode - ANSI version that uses QDBM database manager under the hood. Note - that this is a beta version for growing arbitrarily large knowledge bases, - but is not yet optimized for speed.
- -The ANSI version shares the same source code with the Unicode version, - but replicates the same basic functionality as earlier versions of VisualText.
- -[2] Upgrading. - As always, - care must be taken to upgrade or update existing analyzers and their knowledge - bases. We - have added the topic Updating - Analyzers and KBs, which you should read and follow BEFORE - uninstalling an older VisualText and installing the latest. Also, - analyzer project structure has changed slightly. See - Structure - of Analyzer Projects.
- -[3] Unicode - hints. We've - added the topic Working with Unicode - to help here.
- -Linux and Gnu C++. - Analyzers - built with VisualText can be configured to run on Linux with Gnu C++. - TAI periodically - upgrades the port to the VisualText runtime libraries. The - libraries are not currently bundled with the VisualText release, and you - may inquire about them by contacting us at info@textanalysis.com .
- -(2.7.2.0) Rework of crawling functions eg urltofile,
- to handle HTTPS as well as HTTP.
-(2.7.0.9) New function pnmove to enable moving
- nodes within the parse tree.
-(2.7.0.0) Overhauls, optimizations, and bug fixes focusing on the recursive
- NLP++ pass algorithm.
-(2.6.0.3) New function dejunk to clean out non-ASCII
- and extended ASCII characters (sometimes replacing with a question mark
- character).
-(2.6.0.0) Important fix to NLP++ pattern matcher re feature-based match
- with wildcards. dicttokz
- pass, a variant of dicttok that removes whitespace from parse tree at
- the outset, puts in attributes NOSP (no space before), NL (new line before).
- Adds capitalization
- attributes to parse tree as well. (This
- will be an ongoing development in 2.6.x.x).
-(2.5.0.0) New dicttok
- black-box tokenization pass that uses KB from TAIParse to put part-of-speech
- tags on parse tree automatically. See DictTok_Sample
- analyzer.
-(2.4.x.x) Maintenance releases, various fixes in feature-based matching,
- compiled analyzers, etc.
-(2.3.2.0) In text windows ctrl-A now is Select All. ctrl-G is Find Again.
-(2.3.1.9) Maintenance release. Fixes to error reporting and recovery, compiled
- vs interpreted analyzers.. group now returns the
- new "reduce" node that it creates, an important convenience.
- group
- also reports when it is including the lookahead
- node -- an error. listadd
- no longer treats the list node as the "reduce" node.
-(2.3.1.8) xmlstr now converts characters to {
- where 123 is a character number, rather than to strings such as ¼.
-(2.3.1.6) Added special rule elements _xLET and _xCAPLET to conveniently match single-character
- words.
-(2.3.1.0) VISUAL BASIC .NET API for
- calling VisualText analyzers. See
- the sample program called VB_to_VT, which also
- lists the API functions.
-(2.3.0.0) Compiling analyzers now generates separate code files for each
- pass, enabling large analyzers to be compiled into C++. For
- example, the latest versions of TAIParse should now compile. Note
- that a Microsoft Visual Studio project may now need to have files added
- to it, within an analyzer's RUN folder.
-(2.2.2.13) New PRE actions called regexp for matching
- using regular expressions, with regexpi case
- insensitive version.
-(2.2.2.11) New function for sorting a knowledge base concept's hierarchy
- and children: sorthier and sortchilds.
-(2.2.2.8) Compiling analyzers once again generates PRETTY, or human-readable,
- code. We
- tried very long lines to circumvent the 65K file line limit of some compilers,
- but too-long lines are an issue as well. In
- subsequent versions, we'll be splitting files as needed. For
- now, huge analyzers may need their generated C++ code (in the RUN folder)
- to be tweaked manually in order to compile.
-(2.2.2.5) EXITPASS, SUCCEED, and FAIL. These
- functions have been restored in that they are allowed in practically any
- context without triggering error messages. The
- compiled analyzer version uses C++ exception handling mechanisms in order
- to instantly handle these in deeply embedded contexts (function within
- a function, etc.) Parse
- tree display ("yellow box") now places node variables in two
- columns for convenient viewing of long variable lists. Parse tree nodes
- now point back to rules that renamed them via xrename
- and pnrename. Compile-during-analyzer-load
- popup of MS DOS window has been removed. Interpreted
- user functions improperly returned a non-zero value in the absence of
- a return statement.
-(2.2.2.4) Incorrect VisualText TAB SIZE in Vista has been fixed. SAVE KB
- and COMPILE KB default popup answer is now NO. (Unless
- you are explicitly trying to build a KB, then you don't want to save the
- KB.) Parse
- tree for lone underscore character is now a terminal punctuation char.
- Listadd
- in recursive passes when building a list right-to-left now fixed (compiled
- version hang fixed). excise forbids deleting
- a lookahead node.
-(2.2.2.2) The functions exitpass, succeed,
- fail, can appear only at the top level of code
- regions in compiled analyzers (FIXED.
- See 2.2.2.5 above). Fixes
- to NLP++ syntax relating to negation. A
- fix to float conversion. Further
- fixes to optimized recursive pass algorithm.
-(2.2.2.1) Further fixes to align compiled and interpreted analyzers (fixes
- to zeroed items in relational operators and others). Fix
- of an annoying VisualText crash when brought into focus from the background.
- A substantial
- fix to the optimized recursive NLP++ pass algorithm in both the interpreted
- and compiled analyzer frameworks.
-(2.2.1.1) New function pninsert for programmatically
- inserting nonliteral nodes into the parse tree.
-(2.2.1.0) NEW. A parse tree view mode that reflects items removed from
- the parse tree, such as HTML tags. See
- Tree Text Mode in the
- View Menu.
-Fix to some NLP++ compiled functions to enable zero (0) as a null string.
- E.g., strsubst("ab,c",",",0);
- will replace commas by empty string in a compiled analyzer.
-Note that this behavior already works as expected in interpreted analyzers,
- e.g., those that run inside VisualText.
-(2.2.0.0) A substantially cleaned up VisualText release (see 2.1.0.9 notes
- below). Tree
- Text view does not leave everything expanded on reentering VisualText,
- but remembers what folders have been closed up in the view. The RUN NEXT
- button behaves better.
-(2.1.0.9) A CLEANUP RELEASE. ALIGNED
- INTERPRETED AND COMPILED ANALYZERS, FIXED MISC BUGS AND LEAKS. Fixed
- a substantial bug that hobbled compiled analyzers. Memory
- leaks plugged in eltnode and lasteltnode. The
- PROG project or sample driver for analyzers now sets the BATCHSTART flag
- at the start of a run, to enable a compiled analyzer to test the NLP++
- batchstart() function/flag. (So that an analyzer can perform initializations
- when it runs the first file of a batch of files.)
-DEFAULT configuration of VisualText is now full screen, kb safe mode off,
- toolbars in a standard configuration. TIP
- OF THE DAY offers real suggestions.
-Fixed bugs in the PROG driver of each analyzer, for the analysis of multiple
- files and folders.
-(2.1.0.8) Fix to functions like resolveurl, strchr, strrchr. Fix to parse
- tree nodes with large string-valued variables. Fixes
- to Tab Window and Find Window show/hide bugs. Change
- to VisualText naming in the Windows registry. Fixed
- a memory leak in rmattrs.
-(2.1.0.6) Fixes to file and directory handling. (See
- the PROG project of a newly created analyzer project.)
-(2.1.0.3) Misc fixes, including parse tree display and return of arrays
- in NLP++ user-defined functions.
-(2.1.0.0) In order to support huge knowledge bases, a VisualTextQ version
- is provided that utilizes the QDBM database management freeware under
- the hood. For
- backward compatibility, one can treat the knowledge base built in this
- way as the "compiled" knowledge base. Loading
- the interpreted knowledge base will read kb command files into a QDBM
- file system. "Compiling"
- the kb will save the latest version of the QDBM files -- not compiling
- the changes will discard the latest modifications to the kb.
-
-Other notes: Removed the Windows MS-DOS Command Prompt popups from most
- system calls.
-
-(2.0.2.9) The levenshtein edit-distance computation
- is provided.
-(2.0.2.8) Optimizations to string manipulation using L (local) variables.
- These are
- not interned, as with S,X,G,N variables. Locally
- assigned strings are completely
-freed when a scope (function, @CODE, @CHECK) is exited, while globally
- assigned strings are interned and persist throughout a text analysis.
- Analyzers
- can
-be optimized by using local L variables wherever feasible.
-(2.0.2.7) fltval knowledge base value fetch.
-(2.0.2.5) Linux upgrade.
-(2.0.2.4) New variables G("$passnum")
- and G("$rulenum") e.g. to track
- rule context and performance.
-(2.0.2.3) New NLP++ function eltnode, analogous
- to lasteltnode.
-(2.0.2.2) Recovery from very long tokens.
-(2.0.2.1) Refix of an infrequent crash in using $treetext.
-(2.0.2.0) Optimization to recursive passes.
-(2.0.1.1) Fixes to the Find in Files
- popup menu. Bugs
- were introduced in VisualText 2.0: (a) missing patterns that start at
- the beginning of a line, (b) incorrect display of capitalization in found
- patterns.
VisualText 2.0 is the first to be compiled with Microsoft Visual Studio - .NET. Within - a few releases, Unicode support will be featured as well.
- -Professional version: While code generation is still automated, compiling - analyzers and KBs will need to be done manually for version 2. Similarly, - user projects and other code will need to be upgraded to .NET and compiled, - in order to work properly. See - the topic VisualText - Basics > Compiled and Standalone Analyzers for further guidelines. - Similarly - for updating existing analyzers to version 2.
- -A new feature is the deaccent element modifier, which allows alphabetics - to be matched without regard to accents on characters. NOTE: - Within a rule element, the deaccent keyword must precede any match, fail, - and except lists, in order to work correctly.
- -Miscellaneous
- -(beta) The analyzer sequence can include folders, for organization and - readability. Passes - can be dragged into the folders.
- -Fix to NOOP rule matches in recursive pass. Matching - continues after last node matched by such a rule.
- -Better infinite loop tracking in recursive passes, to catch A -> - B and B -> A grammar loops ("2-state tracking").
- -FEATURE-BASED PATTERN MATCHING. The - functions below enable matching based on whether a node has a variable - with a particular value.
- -var(var_name) #
- If var has nonzero value.
-varz(var_name) #
- If zero or no var.
-vareq(var_name,str) #
- If var equals str.
-vareq(var_name,num) #
- If var equals num.
-varne(var_name,str) #
- If var not equal str.
-varne(var_name,num) #
- If var not equal num.
NLP++ now features initial mathematical - functions.
- -The 1.7 release includes various enhancements to VisualText. Attention - has been given to compiling and running analyzers within the Microsoft - .NET environment. Also, - enhancements have been made to scalability: for example, the analysis - of each text now uses and frees up local tables, so that analyzers should - not grow as new texts are successively analyzed. (Of - course, an analyzer may save things to the KB, in which case overall memory - size will increase.)
- -The knowledge base files in the kb\user directory are now managed in - a new way, to better support scale up in the interpreted KB. A - main.kb top-level file invokes the other command files in that directory - in order to load the interpreted knowledge base. Also, - the attr.kb file has been replaced by multiple files named attr1.kb, attr2.kb, - and so on, depending on the size of the interpreted knowledge base. Old-style - knowledge base directories will automatically be upgraded whenever a knowledge - base is saved.
- -See Sample Analyzers > POStagger for - an example analyzer that integrates a 3rd party part-of-speech tagger.
- -Important: See - the Analyzer Upgrade Note for 1.6, below, regarding upgrading existing - analyzers.
- -GUI behaviors have been changed. Questions - about compiling and saving the KB will be encountered as appropriate. - Also, when - the analyzer sequence or properties are changed, a popup will ask to save - those changes.
- -The GUI no longer uses the gui.kb file to record the analyzer sequence - and the input file hierarchy. Rather, - the input file hierarchy is obtained from the file system, and the analyzer - sequence definition is fetched from the analyzer's spec\analyzer.seq human-readable - file. The - GUI still uses the KB to store this information on a temporary basis when - the analyzer is loaded.
- -Some log files accessible in the Text Tab are now tracked by the Page - Mode mechanism. That - is, their display will automatically update in tandem with the input file - selected in the Text Tab.
- -Timing data for each pass of an analyzer is available in the dbg.log - file.
- -The Finder Window now presents matches using the order of files in the - current analyzer sequence.
- -Browser and input text type-in windows can now accept up to 1024 characters.
- -Some stale or broken pointers to VisualText Help topics have been fixed.
- -By default, new analyzers have the Verbose and Logs Toggle turned off.
- -Scalability enhancement: Separate information tables are built and removed - for the analysis of each input text. This - enables analyzers to run large numbers of texts without slowing down and - without consuming extra memory (depending on whether the analyzer updates - the KB).
- -Incompatible changes to API header files, User project, and standalone - sample code. Existing - analyzers must be upgraded and recompiled. Standalone - code upgraded to recursively process directories of input files. user::loadanalyzer - fixed to create globally managed knowledge base. NLP, - CG, and VTRUN objects created and deleted only within the runtime libraries - via API calls in VisualText\include\Api\lite\vtrun.h.
- -Storage tables in NLP++ and the Conceptual Grammar KBMS have been enlarged - and their performance has been enhanced. The - differences can be substantial for larger input files.
- -Some automatic infinite loop monitoring is performed in passes with - the recursive - algorithm type set.
- -A bug in the fail - plus except - keyword logic has been fixed, within rule element modifiers.
- -Missing KB functions for floating point data type have been installed, - as well as some missing compiled variants of NLP++ functions.
- -Some table sizes have been increased, e.g., for buffers returned by - an analyzer called with user::analyzefile - and user::analyzebuf.
- -Enhancements to analyzer error statements. More - warnings are issued if an NLP++ function is called with too many arguments. - Correct - pass and line numbers have been added to many error messages.
- -The dictgetword function finds a dictionary - word-concept, else makes a new one. A - renaming of addword.
- -The take - command now handles relative paths.
- -The sqlstr function converts strings to a format - for SQL entry into a database. (Merely - converts single quote to two single quotes.)
- -Bug fixes in compiled versions, string catenation and string functions, - both in scaled up string sizes and 0 as a string. Removed - some null string warnings.
- -A compiled vs interpreted issue is that C/C++ conditional evaluation - works in compiled but not interpreted. So - in expressions like A && B, assume that both the A and the B sides - will always be evaluated.
- -(1.7.4) New analyzers now come with a prebuilt Microsoft Visual C++ - user project, including the files prog.dsw - and prog.dsp. For - professional version users, these enable convenient setup of a standalone - sample analyzer. See - the Help topic VisualText - Basics > Compiled and Standalone Analyzers.
- -(1.7.4.5)
- -Fixed _xSTART - rule element modifier within a match list.
- -Fixed rare race condition in opting to not save knowledge base when - exiting VisualText.
- -Fixed handling of inactive passes and changing active/inactive pass - property.
- -Fixed split function to handle large string, - added compiled variant of function.
- -Better handling of "composite" literals formed by rules such - as: redo - <- re \- do @@
- -Fixed returns of some string processing functions. Fixed - crash on catenating null strings.
- -New function: deaccent replaces accented - characters in strings with unaccented characters.
- -Improved error checking in the @DECL region.
- -Fixed parse tree display for analyzing binary files.
- -GUI convenience: When logs turned off, clicking passes in Ana Tab will - not redraw the parse tree. Nicer - to work with large input files now.
- -Fixed display of parse tree view for binary input files.
- -(1.7.4.6)
- -Fixed parse tree display of variables in yellow node popup when Node - Variables toggle is off.
- -(1.7.5)
- -Added a new sample analyzer called POStagger (in VisualText\apps), which - invokes an external part-of-speech tagger. This - analyzer shows how one can extend VisualText with 3rd party software. - See the - Sample Analyzers > POStagger description - for more details.
- -Implemented the setlookahead action, - allowing dynamic setting of the lookahead node after a rule match.
- -(1.7.6)
- -Housekeeping: Further alignment of compiled and interpreted. Fixed compiled-version - of splice action and _xSTART in a match list. Fixed - Save KB crashes due to long concept names. Fixed - infinite loop on some optional rules with lookahead.
- -Added error messages for fully optional rules, range errors in NLP++ - actions.
- -(1.7.7)
- -Fixed crashes with catenating empty strings.
- -Some fixes to the third party POS tagging handshake, handles paths with - space characters.
- -The permuten function is useful for permuting - lists of values.
- -Analyzer Upgrade Note: - Analyzers - built with prior versions of VisualText will not load properly with the - 1.6 version. To - upgrade existing analyzers, you'll want to compare and merge your existing - analyzer project files with those within the VisualText\Templates\Bare - analyzer template. (If - an analyzer was built using another template, best to compare with that - one.) After - merge, you'll want to recompile the analyzer, knowledge base, user projects, - and stand-alone driver program, if any. Important - places to look for mergeable files are:
- -Files in the top level - folder of the analyzer project (e.g., main.cpp)
Kb - folder code files (but do not overwrite your knowledge base files in Kb\user).
Run - folder
User - folder (not Kb\user).
Warning: - Prior to any merge, we strongly recommend (1) making a safe copy of all - your existing analyzers; (2) doing Save KB for analyzers that have a compiled - knowledge base, in order to save the interpreted form of the KB; (3) making - a comparison with each existing analyzer and the Bare template (or other - template that you started with), using a tool such as WinDiff that comes - with Microsoft Visual C++.
- -- -
Simple - merge: If you have only modified the analyzer sequence and pass - files, then the merge is simple. Copy - everything in VisualText\Templates\Bare EXCEPT - the spec folder, kb - folder and .ana file, if any, - to your existing analyzer project. Then - copy the top-level files in the Bare kb - folder, EXCLUDING - the user sub-folder, to your existing - analyzer project.
- -The NLP++ runtime system now enables analyzers to invoke other analyzers - and allows multiple analyzers and knowledge bases to cleanly operate within - the same executable program.
- -In the User project of an analyzer, the sample function User\Ucode.cpp\useranalyzefile - may be called from an analyzer, e.g.,
- -G("buffer for result from analyzer") - = user::analyzefile("analyzername","c:\\forexample\\inputfile.txt", - "data to pass to analyzer via $datum variable", G("ostream"));
- -to invoke another analyzer (assumed to be - in the area defined by the APPS environment variable). The called analyzer - may grab the data from the 3rd argument via the special variable G("$datum"). - Writing - to the cbuf() stream enables the called analyzer to return data to the - calling analyzer.
- -Another function, user::useranalyzebuf(), - illustrates calling a second analyzer, as follows
- -G("result") = user::analyzebuf("analyzername", - "input buffer...", "info for $datum special variable", - G("ostream"))
- -so that a buffer can be processed by a called - analyzer, which returns a buffer result to the calling analyzer.
- -The VisualText programmer's API has been enhanced - to enable multiple analyzers to be loaded into memory once, while invoking - each other multiple times. Creating - an NLP() object now takes an optional name string, so that analyzers may - register themselves in memory and call each other by name. The - function findana will help load once and run - many times within VisualText itself. (This - capability is still under development.)
- -In order to enable load one and run many times - for an analyzer, we also supply the function user::loadanalyzer(analyzername_str). - Thus one - can set up to call a second analyzer as follows:
- -G("analyzer handle") = user::loadanalyzer("myanalyzer");
- -G("result") = user:analyzefile(G("analyzer - handle"), G("input file"), G("stuff to pass down to - $datum variable"), G("ostream"));
- -The second statement could be placed in a - loop in order to analyze a set of input files, thereby saving on analyzer - and knowledge base load time.
- -Note that the first argument to analyzefile - and analyzebuf can be the analyzer name or the "handle", which - currently are equivalent. In - anticipation of VisualText allowing multiple instances of the same analyzer, - we recommend using the "handle" returned by loadanalyzer.
- -New: analyzefile and analyzebuf now also take - an ostream argument (which can be 0), enabling the calling analyzer to - specify an output stream for the called analyzer.
- -Caveats: - Recursive calls to the same analyzer are not supported in the current - version. They - may clobber some working areas such as the knowledge base and the output - folder of an analyzer project. Infinite - calling loops must be guarded against (e.g., by passing down a counter). -
- -If automated compilation of an analyzer's knowledge base is failing, - we recommend defining the user environment variable (in Start Button > - Control Panels > System > Advanced > Environment Variables):
- -VCBIN = C:\Program Files\Microsoft Visual Studio\VC98\bin
- -This assures that the correct linker (named LINK.EXE) will be invoked - by the makefile that compiles an analyzer's knowledge base. (If - your computer has several development programs on it, such as Visual Basic - or Symantec Visual Cafe, then the wrong program named LINK.EXE may be - found inadvertently by the system when linking C++ programs. The - above environment variable is used by VisualText to eliminate this conflict.)
- -HOURGLASS CURSOR BUG - On some - machines, especially new or fast machines, analyzing a file in VisualText - may have led to a hung VisualText session. This - bug, due to a race condition between two threads, has been fixed.
- -Runtime Library Upgrades - Knowledge base and runtime libraries have - been upgraded to remove global variables and install object-oriented programming - constructs.
- -Compilation of larger analyzers has been enhanced by changes to the - C++ code generated from pass files. Some - internal table sizes also have been enlarged.
- -Global string and hash tables used by the analyzer have been enlarged.
- -For display purposes, the new menu item Edit > Change Fonts... allows - a user to bring up a standard font selection popup window. In - this way, text files may be displayed using fonts loaded in the computer - (e.g., - Japanese fonts).
- -Some important fixes to problems with multi-valued NLP++ variables, - e.g., going into and out of user-defined functions.
- -Deployment - The /silent command line option for standalone analyzers - now eliminates extraneous outputs to the console.
- -Some fixes have been made to the error messages printed in the VisualText - log window. This - overhaul is still in progress, and so some error messages may still not - point to the file and line of code that led to a syntax or runtime error.
- -The exitpass function has been upgraded to - work in the @POST region. It - also works within if-else statements, lists of statements, and while-statements. - It should - not be used within user-defined NLP++ functions, however.
- -Compiled variants of NLP++ code have been fixed, including exitpass - and assignment statements (where an OSTREAM is being assigned to a variable). - rightjustifynum - was fixed to handle null values identically in compiled and interpreted - variants.
- -L local variables - may now be used in the @CODE, @POST, and @CHECK regions. They - go out of scope when execution of code in a region is completed.
- -A bug has been fixed in matching rules that contained a triggered element - along with wildcard elements to its left. (Appeared - only in compiled analyzers.)
- -When a browser window with a local HTML file was left open on exiting - VisualText, the file could not be found when reloading the analyzer in - VisualText. This - bug has been fixed.
- -The new function nodeowner has been implemented, - usurping the functionality of of nodeconcept. - The former - fetches the concept that owns the current phrase, while the latter fetches - the concept that the given node is a proxy for.
- -The new function sortconsbyattr sorts - an array of KB concepts by comparing one of their attributes.
- -The new function inputrange conveniently - fetches substrings of the input text. For efficient printing of such ranges, - inputrangetofile is provided.
- -The new function strchrcount counts the - occurrences of a character in a string.
- -The new functions dictfirst and dictnext - enable convenient traversal of the words in the KB dictionary hierarchy.
- -The new Perl-like function split enables splitting - a string into a multi-valued variable (i.e., an NLP++ array) using a given - character as a separator.
- -New functions in support of web page processing: urltofile - fetches a web page as a file and resolveurl - converts a relative URL to an absolute URL. In - conjunction with analyzers calling analyzers, these functions support - web navigation (crawling, spidering, searching) within VisualText. urltofile - now has reasonable timeouts set for fetching a page from the web (but - user cannot modify the timeout setting).
- -The new function xmlstr converts characters - in a string appropriately for outputting XML or HTML files (e.g., converts - "hello&bye" to "hello&bye").
- -Fix to the splice NLP++ action. Developers - should avoid addressing rule elements after actions such as splice - and merge, because numbering - is element numbering is unpredictable after such actions.
- -Variants of the NLP++ strpiece function have - been fixed.
- -Fixes to NLP++ expressions that compare non-numeric types with 0. E.g. - "G("str") == 0". String - catenation with one empty argument has been fixed (e.g., "hello" - + 0).
- -Assignments involving OSTREAM data types have been fixed in the compiled - version.
- -Many error messages have been fixed, but due to overhauls, the pass - and line number are not always available to an error message.
- -Compiled rules with a trigger element and wildcards to its left have - been fixed. Compiled - versions of Boolean testing for knowledge base data types, e.g., in an - if-statement, have been fixed.
- -Local files in the Browser window now display properly when loading - an analyzer.
- -Some enhancements have been made to "retokenization". For - example, one can write rules like
- -oversight <- over sight @@
- -in which the suggested concept is a literal, and have the new "oversight" - node in the parse tree matched by _xALPHA. Getting - the text from N("$treeraw") will also work (though not from - N("$text")).
- -In some 1.6 versions, cout() does not work. This - has been fixed.
- -Version 1.5 is primarily concerned with housekeeping.
- -Changes to the VisualText user interface behaviors make it more convenient - to work with analyzers. When - you click the Run button, the cursor immediately changes to an hourglass. - In viewing - parse trees regardless of settings, the yellow popup box for a node always - displays its variables and values. When - Logs are turned off, the parse tree always displays the final parse tree. - When commenting - text in the Editor, only highlighted lines get commented (fixing the "extra - line commented" feature).
- -The runtime system for compiled analyzers has received major treatment. - For example, - the compiled and interpreted versions of the latest TAIParse can have - their intermediate log files and output files compared on a file-by-file - basis using a program such as WinDiff. Because - interpreted/compiled analyzers are now well-aligned, it is easy to find - any differences between the versions, as a debugging aid. Missing - compiled variants of NLP++ functions have been added and debugged.
- -NLP++ now features database connectivity functions, more or less mirroring - the standard set of ODBC functions. All - database types other than BLOBS are handled. Values - returned from a database are mapped to string, numeric, and float NLP++ - types, as appropriate. See - Database Functions.
- -A sample analyzer illustrating connection to a database and other new - features is in Samples\database1. - See also - Database1 Analyzer.
- -The Attribute - Editor has been substantially overhauled. Management - of the knowledge base value types (string, concept, and numeric) is more - coherent. Methods - have been introduced for specifying and viewing a concept as the value - of an attribute. Up - and down navigation arrows have been added, enabling convenient perusal - of the knowledge base while staying within the Attribute Editor.
- -An analyzer may now cause the creation of a popup window within VisualText, - with the new functions exittopopup() - and getpopupdata().
- -The built-in database function dbbindcol() - is the first to employ call-by-reference within NLP++. User-defined - functions may not use call-by-reference at this time.
- -A silent flag in standalone - analyzer API calls minimizes the amount of debugging and logging output - produced during the operation of a text analyzer.
- -A function for gathering command line arguments has been placed within - the sample standalone code, e.g., in Bare\main.cpp.
- -The VisualText GUI now highlights contiguous text regions with alternating - dark and light colors. That - is, dark blue and light blue alternate to display new nodes built in a - pass, while dark and light green alternate to show nodes matched in a - pass.
- -The conversion functions num() and - str() now handle floating point.
- -A call-by-reference capability has been implemented for NLP++ builtin - functions. Not - yet available to user-defined NLP++ functions.
- -ind wattr, a command for more - conveniently adding knowledge to the kb via command files. See - About KB Command - Files.
- -Fixed an overflow buf in spelling functions.
- -In standalone/embedded analyzers, users may now provide an output stream - and an output buffer to the analyzer. Output - to these is enabled by the new NLP++ functions cout() - and cbuf(). coutreset() - enables rebinding the output stream to a file, while interactive() - checks to see if the analyzer is running in an interactive environment, - e.g., within VisualText. Further - documentation is available in the topic Compiled - and Standalone Analyzers.
- -In version 1.1, we introduced the @DECL region and user-defined function - definitions within NLP++. With - Version 1.2, support for NLP++ functions is much improved, including parameter - lists, arguments, return statements, recursive function calls, and compilation - of all the above. To - implement parameters, we introduce the local variable reference L, similar to the S, X, - N, and G - variable references that are key to NLP++. L - is used not only for parameters, but can define variables local to the - function body.
- -The functions ucodeIni() and - ucodeFin() are available in the - User project of an analyzer. The - analyzer developer may place initializations in ucodeIni that operate - immediately after the analyzer is loaded. Analogously, - cleanups may be placed in ucodeFin, which operates immediately before - the analyzer is closed.
- -Enhancements are in progress that check against an overly large input - text file. More - generally, when the analyzer has expended all available space resources, - then the system will degrade more gracefully rather than crashing. It - is recommended that an input file of about 1MB maximum be run through - a typical text analyzer.
- -As always, huge texts will need to be split up into buffers or multiple - files before presentation to a text analyzer, in general. The - VisualText knowledge base can serve to manage information across multiple - segments of a huge document.
- -- -
VisualText - 1.1 introduces user-defined NLP++ functions. Up - to now, users could only add functions via the C++ user - project associated with each analyzer project, or by requesting - that a function be added by TAI to the NLP++ builtin functions.
- -The current version is a pre-release of the user-defined function capability. - No return - statements and no parameter lists can be written in functions yet. Nor - are there templates that define the inputs and outputs to a function, - nor is overloading of function names allowed. Even - so, the new capability substantially enhances the power of NLP++ for complex - tasks. Rather - than repeating the same code in many places, functions enable the code - to be written in a single centralized location.
- -Functions are placed in the new @DECL region, which must be the first - region in a pass file, when present. Functions - may be called from passes that precede the function definition (i.e., - forward reference). A - sample is
- -@DECL
- -# User-defined function definitions.
- -myfunction()
-{
-"output.txt" << "Entering myfunction." <<
- "\n";
-G("tmp") = 3;
-}
@CODE
-myfunction(); #
- A call to user-defined function.
An interesting feature of NLP++ functions is that their operation can - optionally depend on the region they are called from. For - example, in functions called from a @POST region, the user may use the - S, N, - and X variable - references as though the function's code were placed directly within the - region.
- -A new backtrace and debugging capability is the following. In - a Parse Tree window, double-click on a node, and the pass file that created - that node will open in the Workspace. Further, - the cursor will be placed at the start of the precise rule that created - the node.
- - - - diff --git a/Help/helps/PATH.htm b/Help/helps/PATH.htm deleted file mode 100644 index 45e160d..0000000 --- a/Help/helps/PATH.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - -The PATH Selector lets you specify a path - of node names that must start with _ROOT, the root of the parse tree. - The path specifies the root, its child, grandchild, and so on. The selection - algorithm traverses the parse tree starting at the root and searches for - a context node that matches the entire path. The phrase immediately under - such a context node will be traversed to look for rule matches. (PATH - does not check the unsealed flag.)
- -- - - - diff --git a/Help/helps/POST.htm b/Help/helps/POST.htm deleted file mode 100644 index c0f5fd8..0000000 --- a/Help/helps/POST.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -
NLP++ code in the POST Region executes - after - the rule matcher has successfully matched a rule and the match is accepted. - Element actions are also executed prior to the POST Region.
- -PRE Region
- - - - - - - - diff --git a/Help/helps/POStagger.htm b/Help/helps/POStagger.htm deleted file mode 100644 index 5c2a48c..0000000 --- a/Help/helps/POStagger.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - -NOTE: - We are no longer bundling and distributing this third party tagger, as - its licensing is incompatible with the commercial uses of VisualText.
- -Our most recent part-of-speech tagger that keys off our TAIParse general - analyzer for English is described at TAIParse.
- -The POStagger analyzer project can be found in VisualText\apps. As - an example, it invokes the LexTagger part-of-speech tagger from UMIST, - which is available in VisualText\apps\LexTagger-1.0 and also by contacting - the author, Argyris Vasilakopoulos, for updates and documentation at
- -a.vasilakopoulos@postgrad.umist.ac.uk
- -The POStagger analyzer consists of only two passes. The - first is the default tokenize pass that initiates all VisualText analyzers. - The second - pass looks like
- -@CODE
-user::postagger();
-@@CODE
which invokes the LexTagger software with the current input file, then - parses the result and layers it into the analyzer's current parse tree. - The handshake - code can be found in POStagger\User, within the Ucode.cpp and Umisc.cpp - files.
- -In order to use the analyzer, you'll need to edit the run.bat - and the Properties.txt files within - the LexTagger-1.0 folder, in order to fix the pathnames for your machine. - You'll - also need to edit the paths in the User project to point to your copy - of LexTagger.
- -Note that the current handshake code in the User project copies the - input file to the LexTagger-1.0\test folder. A - more elegant handshake would write out the Properties.txt file for each - input, so that large input files won't need to be copied.
- -Other part-of-speech taggers could easily be swapped in for LexTagger - with some editing of the example handshake in the User project.
- -- -
- - - - diff --git a/Help/helps/PRE.htm b/Help/helps/PRE.htm deleted file mode 100644 index 6c04f29..0000000 --- a/Help/helps/PRE.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - -
The PRE Region is used to extend the pattern matcher's mechanism for - matching each rule element. Currently, - the PRE Region does not support general NLP++ expressions and statements.
- -The actions used in the PRE Region have a mandatory range. Their form - is
- -<num,num> - pre_action_name(args....)
- -The PRE Action applies to each rule - element in the <num, num> range individually.
- -PRE Actions operate only on tokens, - or leaf nodes of the parse tree, at present. So, if the current node covers - more than a single leaf node, the PRE Action automatically - fails. Another thing to be careful of is that - PRE Actions disregard the base attribute of a node. That is, even if the - current node or a subnode has the base attribute set, the PRE Action will look - under it for the leaf node.
- -- -
- - - - diff --git a/Help/helps/PROG_Analyzer.htm b/Help/helps/PROG_Analyzer.htm deleted file mode 100644 index 0e0faeb..0000000 --- a/Help/helps/PROG_Analyzer.htm +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - -
Every analyzer project comes with an MS Visual Studio project called - PROG in the top-level folder. This - shows how to call an analyzer from VisualText.
- -See Compiled - and Standalone Analyzers for more details.
- -- - - - diff --git a/Help/helps/Parse_Tree.htm b/Help/helps/Parse_Tree.htm deleted file mode 100644 index 7d711a2..0000000 --- a/Help/helps/Parse_Tree.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -
The Parse Tree display is a tool for viewing the results of pattern - matching by an analyzer.
- -NEW! Double-clicking - on a node now brings up the pass file and rule that created that node. - This is - a substantial debugging aid, and also empowers a faster mode of development - in which the Logs Toggle is turned off (so that analysis of a text is - faster).
- -Clicking on the "+" in front of a node displays its subtree. - Conversely, - clicking on the "-" in front of a node hides its subtree.
- -Parse Tree Menu, - Parse Tree - Popup
- - - - diff --git a/Help/helps/Possibly_JUNK/Basic_steps_for_creating_a_text_analyzer.htm b/Help/helps/Possibly_JUNK/Basic_steps_for_creating_a_text_analyzer.htm deleted file mode 100644 index ba4f3d9..0000000 --- a/Help/helps/Possibly_JUNK/Basic_steps_for_creating_a_text_analyzer.htm +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - - -This topic outlines the basic steps for creating and running a text - analyzer using VisualText. Since VisualText can be used to create many - different types of text analyzers, we will give a rough outline of the - overall process of creating, running and defining a text analyzer.
- -Creating a new analyzer project:
- -From the File - menu, select New Analyzer.
In the New Analyzer - dialog, provide the following information:
Analyzer Name: - This name will be used to organize the analyzer project. VisualText automatically - assigns a .ana extension to - the name to mark it as the analyzer project file. You use the .ana file - to open the analyzer project.
Location: Select - the default location or navigate to the drive and folder that you would - like to save the analyzer project in.
Template: - Select "Bare". (Currently, the only template available is Bare.) - Bare is the absolute basic or minimal analyzer.)
Click OK.
Creating text files to be analyzed:
- -In the Text - Tab, right click and select Add - > New Text File.
In the dialog box, give the text file a name.
Click OK. The newly created text file opens up in - the Workspace. (The text file is stored in the input folder of the analyzer project. You can - also add files to be analyzed directly into the input folder.)
Adding and saving text to a text file:
- -Double click - on the a file in the Text Tab to open it in the Workspace.
Add text to - the file.
Save the file
- by right-clicking on the file and selecting Save. You can also use the save icon on the Main
- Toolbar. ![]()
Defining the analyzer sequence:
- -The analyzer sequence, made up of - passes, - is viewed and managed in the Ana - Tab. A pass is a discrete step - in the analyzer sequence that has its own pass algorithm. Each analyzer - project comes with a built-in pass in the analyzer sequence. The default - pass tokenize - tokenizes each of the characters in an input file into token types, such - as alpha - for alphabetic, num for numeric, punct for punctuation, etc. As you build your - analyzer, you add passes to the analyzer sequence after the tokenize pass. - Each pass in the analyzer sequence is associated with a pass - file that contains NLP++ code - and rules which instruct the rule matcher what to do. Here is how you - add passes to the analyzer sequence:
- -Select the - pass in the analyzer sequence where you want to add a pass.
Right-click - and select, Add - > New Pass. - (The pass is inserted AFTER the pass you selected.)
In the Pass - Properties dialog, provide the following:
Name: This is the name for the analyzer pass.
Type: Select Pattern for a pattern-based pass - and recursive for a recursive pass.
Click OK.
The new pass is created in the analyzer - sequence. To edit the pass, double click on the pass to open the associated - pass file in the Workspace. For a description on editing pass files, see - the Developer's section.
- -Running an analyzer:
- -Select a file - in the Text - Tab.
From the Analyzer
- Menu, select Run.
- You can also use the run icon from the Workspace toolbar.
A red checkmark on the file icon indicates that the file
- has been analyzed.
When an analyzer is run, a parse - tree is created for the analyzed text. How you define your analyzer sequence - and pass files will determine what kind of information will be displayed - in the parse tree.
- -Viewing the parse tree of an analyzed - text
- -Select the - analyzed file in the Text Tab.
Click on the
- Parse Tree button.
You can also open the file in the Workspace,
- right-click on the file and select View > Parse
- Tree.
Saving the Analyzer:
- -Select Save Analyzer - from the File menu. Save Analyzer - saves the analyzer project and the associated Knowledge Base. (You should - save your project often.)
Answer Yes - to the prompt asking if you want to save the analyzer.
- -
- -
- -
- - - - diff --git a/Help/helps/Possibly_JUNK/NLP++.htm b/Help/helps/Possibly_JUNK/NLP++.htm deleted file mode 100644 index 18a086d..0000000 --- a/Help/helps/Possibly_JUNK/NLP++.htm +++ /dev/null @@ -1,3674 +0,0 @@ - - - - - - - - - - -
[Note: This topic is slated for removal. Refer also - to the NLP++ section.]
- -NLP++� - is a novel programming language developed by Text Analysis International, - Inc. It enables a developer to focus on the conceptual task of building - a text analyzer while minimizing the need to delve into compiled programming - languages. NLP++ combines a C++ -like syntax (called the code - part) with a rule syntax (described in the Pass - Files topic). The current topic is concerned primarily with the code - part.
- -One use of NLP++ is dynamic - semantics, that is, to create and use information "on the - fly". Another is to embed heuristics and algorithms into the text - analyzer under construction.
- -The NLP++ language can currently appear in the @CHECK, @CODE and @POST - regions of a pass file. In a @CHECK region, the functions succeed - and fail can be used to accept - or reject a rule match, respectively.
- -The @PRE region, which operates during the pattern matching of a rule, - does not yet allow NLP++ constructs.
- -WARNINGS:
-[1] The developer must keep in mind that actions that modify the parse
- tree, such as single(), will disable references to the nodes of a phrase
- and otherwise affect the execution of NLP++ code. It is recommended that
- tree-modifying actions follow references to node variables.
-[2] If the developer must reference a newly created node, e.g., by the
- group
- action, he must manually figure out the new element number of the created
- node. Note that following an action such as group, element numbers to the right of the grouped
- node will also change.
See the Pass File section on Tokens.
- -NLP++ currently supports global variables and variables associated with - particular nodes of the parse tree. The syntax for these variables is - as follows:
- - -|
- VARIABLE |
-
- DESCRIPTION |
|
- G(varname) |
-
- Global variable. |
|
- S(varname) |
-
- Variable belonging to the suggested concept - of a rule. |
|
- X(varname - [,num]) |
-
- Variable belonging to the numth - context node starting at the root of the parse tree. Usually used to refer - to the numth - node of the @PATH select list. - With @NODES, the preferred form - is X(varname). |
|
- N(varname - [,num]) |
-
- Variable belonging to a node that matched - the numth element of a rule phrase. |
The shorthand notations N(varname) - and X(varname) refer to the last - element of the phrase and the last context node, respectively. The former - is convenient for rules that have only one element in their phrase. The - latter is convenient when using the @NODES - selector. N(varname, 0) and X(varname, 0) have the identical meaning.
- -There is no notion of a local variable or pointer, at this time. S variables are often used as an idiom - for local variables (the difference is that they "hang around" - if a new node is suggested by the current rule).
- -NOTE: Variable names must be quoted. E.g., N("unknown - word", 2)
- -WARNING: X(varname,num) does NOT refer to the numth member of a @NODES list. That list is - not a path in the parse tree. We recommend using X(varname) with @NODES, to avoid "blindly" - traversing down the parse tree. Using X(varname,2), for example, implies - that you know what the nodes immediately below the root are. Such a use - should be clearly documented.
- -To get useful information from the parse tree and other sources when - analyzing a text, some special variable names have been provided. All - start with a dollar sign ($). - No such variable names are usable with suggested (S) - variables, at present.
- - -|
- VARIABLE NAME |
-
- VARIABLE TYPES |
-
- DESCRIPTION |
|
- $treetext |
-
- N, X |
-
- Fetch the 'cleaned up' (removing leading and - trailing, convert separators to single space) text gleaned from a node's - subtree. Uses the parse tree as input, not text buffer. Analogous to $text. - Difference between $treetext and $text is $text returns text from the - input text buffer while $treetext returns text from the parse tree. So, - if you have removed some nodes from a tree with an excise(), $treetext - returns the text minus the excised elements, while $text returns everything - in the input text buffer, including the text under excised nodes. |
|
- $text |
-
- N, X |
-
- Fetch the text covered by the node. Cleanup - whitespace (removing leading and trailing, convert separators to single - space). Uses the original text buffer, rather than the subtree under the - node, in order to gather text. See also $treetext and $treeraw. |
|
- $treeraw |
-
- N, X |
-
- Fetch the text covered by the node from the - parse tree. Text is not 'cleaned up'. Analogous to $treetext. See also - $treetext and $raw. |
|
- $raw |
-
- N, X |
-
- Fetch the 'cleaned up' text covered by the - node from the text buffer. See also $treetext, $treeraw and $text. |
|
- $xmltext |
-
- N, X |
-
- Same as $raw, but converts characters - that are special to HTML and XML. E.g., "<" is converted - to "<". |
|
- $length |
-
- N, - X |
-
- Get the length of node's - text. |
|
- $ostart |
-
- N, X |
-
- Start offset of the referenced node in the - input text. |
|
- $oend |
-
- N, X |
-
- End offset of the referenced node in the input - text. |
|
- $start |
-
- N, X |
-
- Evaluates to 1 - if the referenced node has no left sibling in the parse tree, else - 0. |
|
- $end |
-
- N, X |
-
- Evaluates to 1 if - the referenced node has no right sibling in the parse tree, else 0. |
|
- $apppath |
-
- G |
-
- Get base directory path for current application. - E.g., "D:\dev\apps\Resume". |
|
- $input |
-
- G |
-
- Get full input file. E.g., "D:\apps\Resume\input\Dev1\rez.txt" |
|
- $inputpath |
-
- G |
-
- Get input file path. E.g., "D:\apps\Resume\input\Dev1" |
|
- $inputname |
-
- G |
-
- Get input filename. E.g., "rez.txt" |
|
- $inputhead |
-
- G |
-
- Get input file head. E.g., "rez" |
|
- $inputtail |
-
- G |
-
- Get input file tail (i.e., extension). E.g., - "txt" |
|
- $allcaps |
-
- N |
-
- Returns 1 if the token underlying the node - is all uppercase. If multiple words (even if all are all-caps), returns - 0. WARN: Not identical to the uppercase() pre action. |
|
- $lowercase |
-
- N |
-
- Returns 1 if the token underlying the node - is all lowercase If multiple words (even if all are all-caps), returns - 0. WARN: Not identical to the lowercase() pre action. |
|
- $cap |
-
- N |
-
- Returns 1 if the token underlying the node - is a capitalized word. WARN: Not identical to the cap() pre action. |
|
- $mixcap |
-
- N |
-
- Returns 1 if the token underlying the node - is a mixed-capitalized word. Examples: "MIchigan", "abcD". |
|
- $exists |
-
- N |
-
- Returns 1 if the node exists, 0 otherwise. |
|
- $unknown |
-
- N |
-
- Returns 1 if the token underlying the node - is an unknown word. WARN: Not identical to the unknown() pre action. Requires - a lookup() code action prior to - any use of this special variable. |
NOTE:
-[1] Special variable names must be quoted. E.g., N("$text", 2).
-[2] You should not assign to or create your own "dollar" variables.
- NLP++ reserves all variable names that start with a dollar sign.
-[3] The $uppercase, $lowercase, $cap, and $unknown differ from the analogous
- pre actions in that they all traverse down to the "leafiest"
- node they can find, in order to perform their check. The corresponding
- pre actions only chain down if the [s] flag is present in the associated
- phrase element(s). Also, the $ variables are not stopped by a [base] attribute
- in a node.
NLP++ can also reference the nodes of a parse tree directly. For example, - N(2) refers to the (first) node - that matched the 2nd element of a rule's right-hand-side phrase. X(3) refers to the 3rd node in the current - context path as specified by @PATH. These constructs are used in functions - that deal with the parse tree (see the Parse Tree Functions section below). - (Note that knowledge base nodes are unrelated to parse tree nodes. The - former are called NODE and the latter PNODE, as in the Types section below.)
- -The types of NLP++ variables available are shown in the following table.
- - -|
- NAME |
-
- ABBREVIATION |
-
- CHARACTERISTICS |
|
- string |
-
- STR |
-
- Alpha-numerics: e.g. G("foobar") - = "w3c"; |
|
- integer |
-
- INT |
-
- 32-bit integers: e.g. G("foorbar") - = 32776; |
|
- boolean |
-
- BOOL |
-
- 1 or 0 (Boolean implemented as a numeric 1 - for true and the numeric 0 for false.) |
|
- ostream |
-
- OSTREAM |
-
- C++ output stream. - fileout(filename) creates a variable - with ostream value and filename << expr; - prints by referring to the ostream value of G(filename). See also - the ofile NLP++ function. |
|
- concept |
-
- CON |
-
- Concepts are the main object in the kb and - appear in the kb hierarchy. They have string names, and optionally have - one or more attributes. e.g. G("myConcept") - = makeconcept(G("root"),"My Name"); |
|
- attribute |
-
- ATTR |
-
- Attributes are associated with concepts and - kb nodes. They have string names, and optionally have one or more values. - e.g. G("myAttribute") = addattr(G("myConcept"),"is"); |
|
- value |
-
- VAL |
-
- Values are the values of kb attributes. They - can be strings, integers or concepts: e.g. addconval(G("myConcept"), - "is", "John Smith"); |
|
- phrase |
-
- PHR |
-
- A phrase is a sequence of nodes owned by a - single concept. E.g., create the first node of a phrase: G("USPhrase") - = makephrase(G("US"),"United"); Add - the last node of the phrase: addcnode(G("US"), - "States"); |
|
- node |
-
- NODE |
-
- Node in the KB. Differs from a concept in - that it is not in the KB hierarchy, but rather in a concept's phrase. - A node can serve as a "proxy" for a concept. |
|
- array |
-
- ARRAY |
-
- The values of an array, or multi-valued variable, - can be any single value (i.e., any type other than a nested ARRAY). |
|
- pnode |
-
- PNODE |
-
- Node in the parse tree. Unrelated to a KB - node. |
Arrays can consist of combinations of simple types. Nested array types - are not implemented. An example follows.
- -# Create an array and step through it.
-G("counter") = 0;
-G("array_size") = 10;
-# Arrays can optionally be "declared" by padding them with 0.
-G("int_array")[G("array_size") - 1] = 0;
-
-while ( G("counter") < G("array_size") ) {
-G("int_array")[G("counter")] = G("counter");
-"output.txt" << G("int_array")[G("counter")] << "\n";
-G("counter") ++;
-}
-# print it out all at once
-"output.txt" << G("int_array") << "\n";.
-# copy it all at once:
-G("another_array") = G("int_array");
Most NLP++ operators are modeled on the C programming language. The - main addition is the confidence - operator, %%. This enables convenient accumulation of evidence - in terms of percent confidence. Following is an operator precedence table, - with highest precedence at the top.
- - -|
- OPERATOR |
-
- DESCRIPTION |
-
- ASSOCIATIVITY |
|
- ++ - -- |
-
- Post increment, decrement |
-
- Left to right |
|
- ++ -- |
-
- Pre increment, decrement |
-
- Right to left |
|
- ! |
-
- Logical NOT (unary) |
-
- Right to left |
|
- + - |
-
- Unary plus, minus |
-
- Right to left |
|
- % * / %% |
-
- Remainder, multiplication, division, confidence |
-
- Left to right |
|
- + - |
-
- Addition, subtraction |
-
- Left to right |
|
- < > <= - == != >= |
-
- Relational operators |
-
- Left to right |
|
- && || |
-
- Logical AND, OR |
-
- Left to right |
|
- = |
-
- Assignment |
-
- Right to left (multiple assignment works) |
|
- *= /= += -= %%= |
-
- Shorthand assignment (unimplemented) |
-
- Right to left |
|
- << |
-
- Output operator |
-
- Left to right |
The - << output operator is modeled on the C++ operator. Only the following - form is supported, currently:
- -filename - << expression << expression - .... ;
- -Example:
- -"output.txt" << "Hello, NLP++!" << "\n";
- -NOTES: - The file named by filename should have been created by a prior fileout(filename) code - action. If that hasn't been done, then the output operator will create - the global variable G(filename) with - the output stream as its value. The default output mode for the file is - append, which can't be modified by the user at - present. Also, the default output directory is the log directory for the - current input file -- also not under user control at present.
- -Say - that something in the parse tree gives you 80% confidence that you've - found a name. You could write this into a global variable as
- -G("name confidence") = 80;
- -Now - you want to account for a new piece of evidence. Say the standalone confidence - of that evidence is 70%. You could combine this as
- -G("name confidence") = G("name confidence") %% 70;
- -which - will yield a new percent confidence between 80% and 100%.
- -The - %% operator guarantees that "adding" or "subtracting" - confidence will always stay within the range of -100 to +100, providing - an intuitive way to gather evidence and compare confidences using a single - scale of measurement. (Actually, %% bottoms out at 0%. A planned change - to the operator will enable it to bottom out at -100%, which can be thought - of as 100% confidence against something.)
- -NLP++ expressions are modeled on the C/C++ programming languages and - can be nested arbitrarily and grouped using parentheses ( - ).
- -One useful enhancement: addition with string arguments or string variables - equates to string catenation.
- -NLP++ supports function calls. Actions, e.g., single, - are specialized functions that don't take generalized NLP++ expressions - as arguments (see Pass Files in the Developers - section). Currently, new NLP++ functions must be defined with C++ code, within an application's user - project. User-defined functions must be preceded by the 'user' - scope qualifier, e.g., user::myfunction. - (Interpreted NLP++ will find the correct function and issue a warning, - but user functions without the scope qualifier will be compiled incorrectly.)
- -This too is modeled after the C programming language. Curly braces { and } - delimit blocks of statements. Statements should end with a semicolon (;). A statement can be an arbitrary - expression, a block, or fully nested if-else - statements.
- -The only loop construct current supported is the while - loop. Here's an example that prints out 0 thru 9:
- -G("counter") = 0;
-G("loop_limit") = 10;
-while( G("counter") < G("loop_limit")) {
-"output.txt" << "Loop counter = " << G("counter") << "\n";
-G("counter")++;
-}
|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- arraylength(VAR) |
-
- INT |
-
- Return number of values in given variable - or expr. (Like a call-by-reference) |
|
- lasteltnode(elt_num) |
-
- PNODE |
-
- Get the last node that matched the elt_numth - element of a rule. |
|
- phrasetext() |
-
- STR |
-
- Get the text that matched the right hand side - phrase of a rule. Analogous to $text. |
|
- phraseraw() |
-
- STR |
-
- Get the raw text that matched the right hand - side phrase of a rule. Analogous to $raw |
|
- pndeletechilds(pnode) |
-
- None |
-
- Delete children of given pnode. |
|
- pnname(pnode) |
-
- STR |
-
- Return pnode's name. |
|
- pnnext(pnode) |
-
- PNODE |
-
- Return pnode's right sibling, if any. |
|
- pnprev(pnode) |
-
- PNODE |
-
- Return pnode's left sibling, if any. |
|
- pnrename(pnode, - str) |
-
- STR |
-
- Rename given pnode. Returns the interned name. |
|
- pnroot() |
-
- PNODE |
-
- Return root of parse tree |
|
- pnsingletdown(pnode) |
-
- PNODE |
-
- Return pnode's child, obeying rules about - going down a "singlet chain." I.e., get child only if no branching - and if not going past node with BASE flag set. |
|
- pnup(pnode) |
-
- PNODE |
-
- Return pnode's parent, if any. Only leftmost - pnode in a list has a parent. |
|
- pnvar(pnode, - var_str) |
-
- (var values) |
-
- Get pnode's variable value(s). |
|
- varinlist(var_str, - elt_num) |
-
- (var values) |
-
- Get var_str variable's value(s) in any pnode - that matched elt_numth element |
|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION | |
|
- strchar(str, - num) |
-
- STR |
-
- Index to numth char of string | |
|
- strchr(str, - ch_str) |
-
- STR |
-
- Find first occurrence of char in string. Return - string headed by char. | |
|
- strclean(str) |
-
- STR |
-
- Remove leading, trailing, and repeat whitespace - separators. | |
|
- strcontains(str1,str2) |
-
- BOOL |
-
- Is str1 contained in str2. | |
|
- strcontainsnocase(str1,str2) |
-
- BOOL |
-
- Is str1 contained in str2, ignoring letter - case. | |
|
- strendswith(str, - suffix_str) |
-
- strstartswith(str, - suffix_str) |
-
- BOOL |
-
- Does given str end with given suffix_str |
|
- strequal(str1,str2) |
-
- BOOL |
-
- Is str1 identical to str2. | |
|
- strisalpha(str) |
-
- BOOL |
-
- Is str all alphabetic chars. | |
|
- strisdigit(str) |
-
- BOOL |
-
- Is str all numeric chars. | |
|
- strnotequal(str1,str2) |
-
- BOOL |
-
- Does str1 differ from str2. | |
|
- strequalnocase(str1,str2) |
-
- BOOL |
-
- Is str1 identical to str2, ignoring letter - case. | |
|
- strnotequalnocase(str1,str2) |
-
- BOOL |
-
- Does str1 differ from str2, ignoring - letter case. | |
|
- strlessthan(str1,str2) |
-
- BOOL |
-
- Is str1 lexically before str2. | |
|
- strgreaterthan(str1,str2) |
-
- BOOL |
-
- Is str1 lexically after str2. | |
|
- strlength(str) |
-
- INT |
-
- Return length of string. | |
|
- strpiece(str, - start_num, end_num) |
-
- STR |
-
- Return substring from start_num to end_num - indexes. Zero-based | |
|
- strrchr(str, - ch_str) |
-
- STR |
-
- Find last occurrence of char in string. Return - string headed by char | |
|
- strsubst(str, - old_str, new_str) |
-
- STR |
-
- In str, substitute instances of old_str with - new_str. | |
|
- strtolower(str) |
-
- STR |
-
- Return lowercase form of string. | |
|
- strtotitle(str) |
-
- STR |
-
- Capitalize string as in a title or header. | |
|
- strtoupper(str) |
-
- STR |
-
- Return uppercase form of string | |
|
- strtrim(str) |
-
- STR |
-
- Remove leading and trailing whitespace from - str. | |
|
- unpackdirs(dir_str) |
-
- STR ARRAY |
-
- Unpack directory names from a full directory - path string. | |
|
- strwrap(str, - num) |
-
- STR |
-
- Fold string successively at every numth character. | |
|
- num(str) |
-
- NUM |
-
- Convert string to number, if possible. - (Also accepts num arg). | |
|
- str(num) |
-
- STR |
-
- Convert numeric value to string. (Also - accepts string arg). |
|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- fail() |
-
- None |
-
- In @CHECK region, abort the rule that has - just matched. Noop elsewhere. |
|
- succeed() |
-
- None |
-
- In @CHECK and @CODE region, succeed without - performing further code actions in that region. |
|
- batchstart() |
-
- BOOL |
-
- True if current file is first in a batch run. |
|
- debug() |
-
- BOOL |
-
- No op. Convenient breakpoint for debugging - from C++ compiler. |
|
- hitconf(hits_num, - total_num, fudge_num) |
-
- 0 to 100 |
-
- Percent confidence for hits. Fudge factor - is typically 3 to 20. |
|
- LJ(num, fieldsize_num) |
-
- STR |
-
- Left-justify num in given field size. |
|
- ofile(path_str - [, mode_str [, mode_str [, mode_str]]] ) |
-
- OSTREAM |
-
- Open an output file for the given path; analogous - to C++ open file function. Zero to three mode strings selected from: 1) - "app" = append; 2) "ate" = special - C++ append; 3) "binary" = open in binary mode (text is default). - WARNINGS: Default mode is OVERWRITE, not APPEND. Unlike fileout(), does - not create a global variable for the file stream. [Upgraded - doc to conform to standard C++ i/o libraries.] |
|
- percentstr(numerator_num, - denominator_num) |
-
- STR (" - 0" to "100") |
-
- Format a percentage (right-justified in field - of 3 chars). |
|
- rightjustifynum(num, - fieldsize_num) |
-
- STR |
-
- Format a percentage (right-justified in field - of 3 chars). |
|
- spellcandidates(word_str) |
-
- STR |
-
- Return list of space separated candidates - for spell-correcting given word. |
|
- spellcorrect(word_str) |
-
- STR |
-
- If known word, return as-is. If not, return - best spelling guess. |
|
- spellword(word_str) |
-
- BOOL |
-
- See if given word is a known English word. |
|
- strspellcandidate(word_str, - list_str) |
-
- STR |
-
- Choose best spell-correct candidate for a - word, given a list of space-separated candidates (as returned by spellcandidates, - e.g.) |
|
- strspellcompare(str1, - str2) |
-
- INT |
-
- Return spelling "distance" between - two given words. The smaller the number, the fewer the corrections to - get from one to the other. |
|
- system(str) |
-
- BOOL |
-
- Execute str as operating system command |
Note: It is necessary to escape the directory delimiter backslash ('\') - with another ('\'). For example, suppose you wanted to echo characters - to a file and then copy that file to some other directory. Here's some - example code:
- -@NODES _ROOT
-@POST
-# echo.txt is put in your default console location, which for
-# me happens to be D:\WINNT\Profiles\Administrator\Desktop
-system("echo this is a test > echo.txt");
-# echo1.txt ends up in D:\WINNT\Profiles\Administrator\Desktop
-system("copy echo.txt echo1.txt");
-# echo2.txt ends up on D:
-system("copy echo1.txt D:\\echo2.txt");
-# echo3.txt ends up on D:\apps
-system("copy D:\\echo2.txt D:\\apps\\echo3.txt");
-"output.txt" << "copy.\n" ;
-noop();
-@@POST
-@RULES
-_xNIL <- _xALPHA @@
The RECURSE Region is a nested "minipass" within a pass file. - It can only be invoked from an element of a rule that has matched. The - phrase that the recurse minipass operates on is the set of nodes that - matched the invoking rule element. Each RECURSE Region contains within - it a Grammar Region.
- -Here's an example taken from the RFA (Rules-File Analyzer), which parses - the pass files themselves.
- -@RECURSE actionpass # Start of a RECURSE Region. A name, e.g. "actionpass", is required.
- -@RULES # Start of one RULES Regions within the RECURSE minipass.
- -# The minipass converts literals (e.g., "single") to actions in context.
- -_ACTION <- _LIT @@
- -@@RECURSE # End of the RECURSE minipass. Note that @@RULES is optional.
- -# .... # Additional RECURSE minipasses may be specified here.
- -# The GRAMMAR ZONE (i.e., the main Grammar Region of the pass file) starts here. It has no marker.
-# Note that in this case, the @@RECURSE terminator is required, so that the main Grammar Region is not
-# taken to be part of the previous RECURSE minipass.
@RULES
- -_POSTS [base] <- # Simplified rule for identifying a @POST Region.
- -_soPOST # @POST
-_xWILD [matches=(_LIT _ACTION) recurse=(actionpass)]
-_eoPOST [opt] # @@POST is optional.
@@
- -In the above example, when the NLP++ parser (RFA or RFB) sees a plain - word like "single" in a file, - it doesn't know whether to reduce it to an _ACTION or not. But within - the markers @POST and @@POST, the literal should be treated as an action. - This allows the parentheses in pass file actions to be optional, when - the action takes no arguments. E.g., "single()" and "single" - are equivalent.
- -In general, RECURSE mini-passes enable a mechanism for "roughing - out" a text and then applying the correct assignments when the context - has been determined unambiguously. They have many other uses, such as - traversing nodes that matched a rule element in order to perform cleanups, - data gathering, deletions, and so on.
- -For a phrase element modifier that invokes - a recursive rules pass, see the recurse - modifier.
- - -|
- Note: - A RECURSE Region cannot contain a CODE Region or a SELECT Region. A SELECT - Region would be meaningless, since the RECURSE Region operates on a phrase - specified by the rule element that invokes it. |
The RULES Region is where you write the actual NLP++ rules. The - RULES Region begins with the @RULES marker and optionally terminates with - the @@RULES marker.
- -Action Regions (i.e. PRE, CHECK, and POST) that precede a RULES Region - apply to every rule within the RULES Region.
- -A RULES Region with no preceding Action Regions gets the default reduce - action, single() applied to every - rule match within it.
- -In order to reset the actions that apply to a RULES Region, one must - reset actions by adding a @RULES marker before the rules to be reset.
- -Example:
- -@POST
-N("noun", 3) = "true";
single();
-@RULES
-_np <- _det _quan _xALPHA @@
-_np <- _det _xALPHA @@
In the above, we want to mark alphabetic tokens as possible nouns based - on their context. But the code in the POST Region sets a variable called - "noun" to "true" in the node matching the THIRD element - of each rule in the RULES Region. However, this will fail, since the second - rule has only two elements on the right hand side. Therefore, this example - must be rewritten as
- -@POST
-N("noun", 3) = "true";
single();
-@RULES
-_np <- _det _quan _xALPHA @@
- -
@POST
-N("noun", 2) = "true";
single();
-@RULES
-_np <- _det _xALPHA @@
It's even easier to forget to add a lone @RULES so as to reset to the - default action for subsequent rules.
- -NOTE: - Our Resume analyzer project ended in 2001, - with an ancient version of VisualText and NLP++. The project emphasized - development of the RUG automated rule generation capability (a prototype - capability in VisualText). Please - don't judge VisualText and NLP++ - by this prehistoric analyzer! Instead, - look at TAIParse as an example - of the things you can do with VisualText and NLP++.
- -An advanced resume analysis prototype is available via download from - our website. It - extracts contact information, experience and education records from resumes - at 80% accuracy (90% precision and 75% recall/completeness). It - is available at
- -http://dev.textanalysis.com/Rez0_3_1.zip - (latest compiled version)
- -http://www.textanalysis.com/Apps/Information_Extraction/information_extraction.html
- -- - - - diff --git a/Help/helps/S.htm b/Help/helps/S.htm deleted file mode 100644 index 6f2d780..0000000 --- a/Help/helps/S.htm +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - -
[1] Reference to a parse tree node or its variable. See - Variables.
- -[2] Reference to a phrase element modifier. s is an - alternate form for the phrase element modifier singlet.
- - - - diff --git a/Help/helps/SELECT.htm b/Help/helps/SELECT.htm deleted file mode 100644 index ddd50d3..0000000 --- a/Help/helps/SELECT.htm +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - -The SELECT Region specifies methods for selecting context - nodes in the parse tree. Each selected - node serves as a locus for rule matching.
- -The SELECT Region may include at most one selector, - chosen from the following:
- - -|
- SELECTOR |
-
- DESCRIPTION |
|
- @NODES |
-
- A list - of node names to be searched for independently in the parse tree. The - phrase immediately under such a context node will be traversed to look - for rule matches. NOTE: - The selection algorithm will only find such a node when all of its ancestors - have the unsealed attribute set. |
|
- @PATH |
-
- A path - of node names that must start with _ROOT, the root of the parse tree. - The path specifies the root, its child, grandchild, and so on. The selection - algorithm traverses the parse tree starting at the root and searches for - a context node that matches the entire path. The phrase immediately under - such a context node will be traversed to look for rule matches. (The PATH - Selector does not check the unsealed - flag.) |
|
- @MULTI |
-
- A list - of node names to be searched for independently in the parse tree. The - entire subtree under such a context node will be traversed to look for - rule matches. (The MULTI Selector currently does not check the unsealed - flag.) |
In addition to the selector markers @NODES, @PATH, and @MULTI there - are optional markers that indicate the termination of a selector specification. - The corresponding - markers are @@PATH, - @@NODES, and @@PATH.
- -The SELECT Region itself is optional. If the region is not included - in the pass file, the default is to match the rules of the file against - the top-level phrase of the parse tree, that is, the phrase directly under - the _ROOT node. The default could - be made explicit, as in the following:
- - -|
- @SELECT |
-
- # Start of SELECT Region |
|
- @NODES _ROOT |
-
- # Specifies nodes whose underlying phrase - will be matched against. |
|
- @@SELECT |
-
- # Optional end-marker for SELECT Region |
(The region markers @SELECT and @@SELECT are also optional. The sample - SELECT Region above could be simply @NODES _ROOT.)
- -- - - - diff --git a/Help/helps/SPLASH_SCREEN/Welcome.htm b/Help/helps/SPLASH_SCREEN/Welcome.htm deleted file mode 100644 index b118a73..0000000 --- a/Help/helps/SPLASH_SCREEN/Welcome.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - -
- -

*** New to VisualText? Start by taking the Quick Tour! ***
- -
- -
- - - - diff --git a/Help/helps/Sample_Analyzers/Corporate_Analyzer.htm b/Help/helps/Sample_Analyzers/Corporate_Analyzer.htm deleted file mode 100644 index c8ad60c..0000000 --- a/Help/helps/Sample_Analyzers/Corporate_Analyzer.htm +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - -
The tour of the Corporate Analyzer (in the VisualText\apps folder) is - intended to take you through the step by step process used in building - the Corporate Analyzer. It will give you an idea of the approach and techniques - used to build analyzers. This tour is a supplement to the VisualText Quick - Tour. Study - of the tutorials is also recommended for a more complete understanding - of this tour.
- -We recommend you run the Corporate Analyzer application as you go through - the tour. This will give you an opportunity to see how the analyzer works - as you read through the discussion.
- - - -- - - - diff --git a/Help/helps/Sample_Analyzers/Database1_Analyzer.htm b/Help/helps/Sample_Analyzers/Database1_Analyzer.htm deleted file mode 100644 index fc410b0..0000000 --- a/Help/helps/Sample_Analyzers/Database1_Analyzer.htm +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - -
VisualText version 1.4 introduces database connectivity functions within - NLP++. The - database1 sample analyzer (in VisualText\apps) connects to a database, - sends commands to it, retrieves data from it, and prints the results to - a file. Some - features:
- -Uses the interactive() - function to alter the behavior of the analyzer when running within VisualText - as opposed to standalone
Uses the exittopopup() - function within VisualText to have the user type in a command such as - "SELECT * FROM sql;". Then - a subsequent pass can grab the type-in using getpopupdata().
Includes an example of fetching every supported - database type. Everything - except the various BLOB data types is handled.
Includes the first use of call-by-reference in - NLP++, with the calls to dbbindcol(). - This is - the only built-in function to use call-by-reference at present. User-defined - NLP++ functions cannot take advantage of call-by-reference yet.
Includes a standalone executable version of the - analyzer. Can - be run with: c:\apps\database1\Release\database1.exe - input\misc\xxx.txt
To set up the precise example within this analyzer, you will first need - to install a database. We - recommend downloading MySQL and MyODBC and configuring them as described - at their respective web sites. Copy - the database1 folder from samples to c:\apps. Then - set up an ODBC connection to a database called test (making sure to match - the account information to that in c:\apps\database1\data\createdb). Then - one can run a command such as
- -c:\mysql\bin\mysql test - < c:\apps\database1\data\createdb
- -in order to create the same "test" database tables and values - as used in the database1 analyzer.
- -The two pass files within the database1 analyzer contain further notes - regarding this application.
- -- - - - diff --git a/Help/helps/Sample_Analyzers/GenTxtDocs/GenTxt1.htm b/Help/helps/Sample_Analyzers/GenTxtDocs/GenTxt1.htm deleted file mode 100644 index 125dbd1..0000000 --- a/Help/helps/Sample_Analyzers/GenTxtDocs/GenTxt1.htm +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - -
GenTxt is not currently supported. It is superseded - by TAIParse, which is available at
- -http://www.textanalysis.com/Apps/POS_Tagger/pos_tagger.html
- -An older version, - which includes a semantic analysis framework, is also available at
- -http://www.textanalysis.com/Apps/Natural_Language_Processing/natural_language_processing.html
- -A knowledge - base that embeds WordNet is also available on request.
- -- - - - diff --git a/Help/helps/Setting_Rule_Generation_Properties.htm b/Help/helps/Setting_Rule_Generation_Properties.htm deleted file mode 100644 index 2bb6c65..0000000 --- a/Help/helps/Setting_Rule_Generation_Properties.htm +++ /dev/null @@ -1,776 +0,0 @@ - - - - - - - - - - -
You can control the generation of particular rule sets by setting attributes - for concepts in the Gram (or sample) hierarchy. These attributes control - aspects of rule generation and specify actions to associate with generated - rules.
- -Properties are set using the Gram Concept - Properties dialog (below). The dialog box is accessed from the - Gram Tab by selecting Properties - from the context menu. The various attributes in the Gram Concept Properties - are outlined below.
- -
|
- Item |
-
- Description |
|
- Name |
-
- Name of the current concept. |
|
- Sample File |
-
- Associated file of samples to import/export, - if any. |
|
- Attributes |
-
- Controls for rule generation (see tables below.) |
|
- Done |
-
- Closes the Gram Concept Properties dialog. |
|
- Help |
-
- Launches Help documentation. |
The user can choose to preserve or discard sets of rules that are automatically - generated from samples. Some sets are useful primarily for debugging the - rule generation process. They might also be useful in very highly specialized - contexts within a text.
- -The Constrain rule set is by far the most generally useful set of rules.
- - -|
- ATTRIBUTE |
-
- VALUES |
-
- DESCRIPTION |
| - | -
- true/false/<NONE> |
-
- Keep rules that collect
- each token of a sample into a list of all its suggested concepts. E.g., |
| - | -
- true/false/<NONE> |
-
- Keep rules that collect - the most literal possible form of each token. NOTE: If parts of a sample - are already reduced by prior rules, then the rule will not look as literal - as expected. |
| - | -
- true/false/<NONE> |
-
- Keep rules that merge samples with same length
- and general composition, constrained as far as possible. E.g., given samples
- "1261 Starlit Dr." and "3 Elm St.", build a rule like |
| - | -
- true/false/<NONE> |
-
- Keep unconstrained rules that merge samples
- as in GEN, with consistent labeling (i.e., layering). E.g. |
| - | -
- true/false/<NONE> |
-
- Keep rules that merge samples with same length
- and general composition. E.g., |
Each literal rule is labeled as completely - as possible, depending on other samples that the rule merged with.
- -|
- ATTRIBUTE |
-
- VALUES |
-
- DESCRIPTION |
| - | -
- true/false/<NONE> |
-
- (Operates on LABEL concepts. If set for a - nonlabel concept, applies to every element of every rule in the subhierarchy). - Merge the literal values due to each sample, rather than building generalized - elements such as _xALPHA and _xNUM. |
| - | -
- string |
-
- Create a layer key-value pair in the suggested concept for rules in - the Gram subhierarchy. E.g, layer=_Caps will create rules like _city [layer=(_Caps)] - <- New [s] York [s] @@ |
| - | -
- true/false/<NONE> |
-
- Create semantic variables
- in the suggested concept of rules, using label concepts to name the variables.
- E.g., if the Gram hierarchy has a rule concept humanName and under it
- the label concepts firstName
- and lastName, then the rules built for humanName will create variables
- called firstName and lastName with the appropriate text as their value.
- Generates NLP++ POST Actions such as |
| - | -
- true/false/<NONE> |
-
- If true, keeps the rule - generator from traversing the locked subtree. If there are new samples, - the rule generator will override the lock on the concepts owning the samples. |
| - | -
- true/false/<NONE> |
-
- [INTERNALS] True if the - subtree will have rules for it regenerated with a Generate Dirty menu - item. To set this manually in VisualText, use the Mark For Generation - menu item. |
| - | -
- true/false/<NONE> |
-
- Expand any whitespace - present in a rule to an element like _xWHITE - [s star]. (That is, zero or more white spaces.) |
Inherited attributes - By setting attributes - at a concept, the entire subtree under that concept inherits those attribute - values. In this way, the user can quickly control the way rules will be - generated for an entire sub-hierarchy. This method also enables the user - to override the settings wherever desired.
- -Default - attribute values - The CONSTRAIN attribute and the XWHITE attribute - are true except where overridden in the Gram Hierarchy. Similarly, all - other attributes are empty or FALSE, as appropriate.
- -- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/TAIParse.htm b/Help/helps/TAIParse.htm deleted file mode 100644 index 04f736f..0000000 --- a/Help/helps/TAIParse.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
TAIParse is a general analyzer for English. It - is the best starting point for many text analysis and information extraction - tasks.
- -NOTE: The latest TAIParse release now includes its compiled run.dll - library, making it easy to call outside VisualText. (Still - need VisualText installed for its runtime libraries). The - latest TAIParse (0.8.1.2 at this time) will be placed at
- -http://dev.textanalysis.com/taiparse.zip
- -NOTE 2: It is compiled with Microsoft Visual C++ 2008. If - you are running an older version, you'll need to compile it for yourself - or get help from TAI.
- -- -
Two older versions can still be downloaded from our website.
- -1. - Part-of-speech tagger. This - is the latest version that focuses on accurate part-of-speech (POS) tagging. - The URL - below is for a beta version at about 90% accuracy. It - can be run (and modified) within VisualText, and also can be run as a - standalone executable program. We - also have available a newer version of the tagger at 94% - accuracy -- contact TAI for licensing the absolute latest.
- -http://www.textanalysis.com/Apps/POS_Tagger/pos_tagger.html
- -2. Another version of TAIParse is available, which incoporates a sample - semantic analysis system. The - capabilities of this system are being migrated to the one above.
- -http://www.textanalysis.com/Apps/Natural_Language_Processing/natural_language_processing.html
- -- - - - diff --git a/Help/helps/Table_of_Array_Functions.htm b/Help/helps/Table_of_Array_Functions.htm deleted file mode 100644 index 8f01d0a..0000000 --- a/Help/helps/Table_of_Array_Functions.htm +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - -
Arrays and lists are treated equivalently in NLP++, and we'll continue - to call them both "arrays" for conciseness.
- -The current section is meant to round out the treatment of list-like - capabilities such as pushing a value to the front. Up - to now, arrays were grown mainly by indexing to the last element.
- -Arrays can also be assigned and manipulated with parse tree functions - and kb functions.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- push(var) |
-
- ARRAY |
-
- Push a value to the front of a variable's - value(s). Allows - mixed types (string, num, flt, concept...), allows redundant values, does - not check uniqueness. NOTE: This will alter the array indexing, pushed - item will be the 0th element of array index. UNIMPLEMENTED |
|
-
|
-
-
|
-
-
|
- -
- -
- - - - diff --git a/Help/helps/Table_of_Database_Functions.htm b/Help/helps/Table_of_Database_Functions.htm deleted file mode 100644 index 1974aed..0000000 --- a/Help/helps/Table_of_Database_Functions.htm +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - -
The NLP++ functions for interfacing with a database are listed here - in table form for easy reference. For - examples of these functions, refer to the individual function pages included - in the Database Functions section. Also - available is a sample analyzer illustrating connection to a database, - in Samples\database1. An - introductory page is available at Database1 - Analyzer.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- dballocstmt() |
-
- BOOL |
-
- Create a handle for an active database statement. - (Stored - internally, allows only one active handle at a time.) |
|
- dbbindcol(column_num, type_str, - size_str, &var, &flag_var) |
-
- BOOL |
-
- Bind the given database column number to the - NLP++ variable var. type_str - specifies the database data type being fetched. size_str - specifies the size needed to store the database value being retrieved - -- for some types, it is ignored. flag_var - is a second NLP++ variable used to flag whether the currently fetched - row contains a value in the column being fetched. Calls - to dbbindcol are followed by calls - to dbfetch in order to fetch successive - database rows. Note - that the ampersands are needed to indicate call by reference, i.e., that - values are being passed up to the two NLP++ variables. E.g., - dbbindcol(1,"string",255, - &G("employee name"),&G("result flag")); |
|
- dbclose() |
-
- BOOL |
-
- Close the currently open database. (Only - one database can be open at a time.) |
|
- dbexec(cmd_str) |
-
- BOOL |
-
- Send a statement to the currently open database. - A modular - function that creates a statement handle, sends the command string, then - closes the statement handle. |
|
- dbexecstmt(cmd_str) |
-
- BOOL |
-
- Send a statement using the currently open - statement handle. Assumes - a statement has been opened with dballocstmt. |
|
- dbfetch() |
-
- BOOL |
-
- Fetch a row from a database. Columns - bound by previous calls to dbbindcol - will get their variables filled with values from the columns in this database - row. Returns - 1 as long as rows successfully fetched, else 0. |
|
- dbfreestmt() |
-
- BOOL |
-
- Frees the statement handle allocated by dballocstmt. Only - one statement handle can be active at a time. |
|
- dbopen(db_str [, user_str] [, password_str]) |
-
- BOOL |
-
- Open the given database name with user name - and password. Depending - on the database and account set up, the user name and password may be - optional. |
|
-
|
-
-
|
-
-
|
- -
- - - - diff --git a/Help/helps/Table_of_Formatting_and_I_O_Functions.htm b/Help/helps/Table_of_Formatting_and_I_O_Functions.htm deleted file mode 100644 index 494ce8a..0000000 --- a/Help/helps/Table_of_Formatting_and_I_O_Functions.htm +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - -
The NLP++ functions used formatting and performing input and output - operations are listed here in table form for easy reference. For - examples of these functions, refer to the individual function pages included - in the Formatting and I/O Functions section.
- -The return types include: STR - (string), OSTREAM (output stream) - and BOOL (Boolean). Boolean - type is currently implemented by integer 1 - (or non-zero) for true and 0 for false.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- cbuf() |
-
- OSTREAM |
-
- Output to buffer that user supplied for the - current parse (standalone or embedded only). |
|
- cout() |
-
- OSTREAM |
-
- Output to standard output or user-supplied - stream (the latter in standalone or embedded only). |
|
- coutreset(fileNameStr) |
-
- OSTREAM |
-
- Bind cout() stream to the given filename. |
|
- closefile(fileOstream) |
-
- BOOL |
-
- Close the output file stream. |
|
- inputrangetofile(start_n,end_n,out_ostr) |
-
- BOOL |
-
- Print - a range of chars from the input text to an output stream. (Listed - with Parse Tree Functions) |
|
- LJ(num, fieldsize_num) |
-
- STR |
-
- Left-justify num in given field size. |
|
- openfile(fileNameStr) |
-
- OSTREAM |
-
- Open output file stream. |
|
- percentstr(numerator_num, - denominator_num) |
-
- STR (" - 0" to "100") |
-
- Format a percentage (right-justified in field - of 3 chars). |
|
- rightjustifynum(num, - fieldsize_num) |
-
- STR |
-
- Right-justify num in given field size. |
|
- today() |
-
- STR |
-
- Format the current date and time as a string. |
The functions used to operate on objects in the Knowledge Base have - been listed here in table form for easy reference. For - examples of these functions, please refer to the individual function pages - within the subsections of the current Help section, Knowledge Base Functions.
- -The names of KB objects are abbreviated as follows: concept (CON), - attribute (ATTR), value (VAL), and phrase (PHR). -
- -The return types include: CON, - ATTR, VAL, - PHR, INT - (integer), FLT - (float), STR (string), BOOL - (Boolean). Boolean - type is currently implemented by integer 1 - (or non-zero) for true and 0 for false.) - NONE - indicates nothing is returned.
- -In the table below, a name must - be a STR, parent is a CON, attr_str is a STR, hier - is a CON.
- - -|
- FUNCTION(ARG1,ARG2...) |
-
- RETURN TYPE |
-
- DESCRIPTION |
|
- Command - File Functions |
-
-
|
-
-
|
|
- kbdumptree(root_con, file_str) |
-
- BOOL |
-
- Create a dump file of knowledge base concept. |
|
- take(file_str) |
-
- BOOL |
-
- Execute commands in a knowledge base command - file (.KB file) |
|
- writekb() |
-
- BOOL |
-
- Dumps the entire KB currently in memory to the kb/user directory which includes a word.kb, attrs.kb, and main.kb file. |
|
- Functions - that Find and Fetch |
-
-
|
-
-
|
|
- findroot() |
-
- CON |
-
- Find the root concept of the knowledge - base (named concept). |
|
- findconcept(con, - str) |
-
- CON |
-
- Find and - return the concept with name str under the parent concept con. |
|
- findconcept(con, - num) |
-
- CON |
-
- Find concept - number num - under the parent concept con. |
|
- findattr(con, - str) |
-
- ATTR |
-
- Fetch attribute named str - belonging to concept con. |
|
- findattrs(con) |
-
- ATTR |
-
- Fetch concept's list of attributes. |
|
- attrname(attr) |
-
- STR |
-
- Fetch attribute's name. |
|
- attrtype(concept,attrName) |
-
- NUM |
-
- Fetch an attribute's type. 0 = string, 1 = number, 2 = concept, 3 = float. |
|
- attrvals(attr) |
-
- VAL |
-
- Fetch attribute's list of values. |
|
- findvals(con, - name) |
-
- VAL |
-
- Fetch list of values for a concept's attribute. |
|
- numval(con, - name) |
-
- NUM |
-
- Fetch numeric-value of attribute (must be - first). |
|
- fltval(con, name) |
-
- FLT |
-
- Fetch float value of attribute (must be first). |
|
- strval(con, - name) |
-
- STR |
-
- Fetch string-value of attribute (must be first). |
|
- conval(con, - name) |
-
- CON |
-
- Fetch concept-value of attribute (must be - first). |
|
- attrwithval(con, attr_str, val_str) |
-
- BOOL |
-
- Check if concept's attribute has given - value (multiple-value aware). Note that second two arguments must be STR. |
|
- inheritval(con, - name, topCon) |
-
- STR |
-
- Find string attribute's value up the hierarchy. - con is the current concept, topCon is the root to be searched up - to, and name is the name of the - attribute. If hier==0, goes to root of KB. |
|
- conceptname(con) |
-
- STR |
-
- Fetch name of given concept. |
|
- conceptpath(con) |
-
- STR |
-
- Fetch entire path of given concept as a string. |
|
- pathconcept(str) |
-
- CON |
-
- Fetch concept, given the path str. |
|
- wordpath(str) |
-
- STR |
-
- Get entire path of dictionary concept for - the given string. |
|
- findwordpath(str) |
-
- STR |
-
- Find entire path of dictionary - concept for the given string. (If not present, don't add the word.) |
|
- wordindex(str) |
-
- CON |
-
- Fetch index entry for dictionary concept. - Gets index - concept that str would be added under. |
|
- findhierconcept(name, - hier) |
-
- CON |
-
- Find a concept in the subhierarchy of a given - concept. e.g.: G("returnedConcept") = findhierconcept("child",G("ancestor")); - finds the concept named "child" anywhere under the concept pointed - to by G("ancestor"). |
|
- dictfindword(str) |
-
- CON |
-
- Find dictionary concept - in dictionary hierarchy of KB. |
|
- dictfirst() |
-
- CON |
-
- Fetch the first word-concept in the KB dictionary - hierarchy. (New in 1.6) |
|
- dictnext(con) |
-
- CON |
-
- Fetch the word following the given word in - the KB dictionary hierarchy. - (New in 1.6) |
|
- attrexists(hier, - attr_s, val_s) |
-
- BOOL |
-
- Find attribute and value pair in the subhierarchy - of a concept. |
|
- attrchange(hier, - attr_s, val_s, new_s) |
-
- BOOL |
-
- Replace all matching attribute-value pairs - in the given hierarchy to have the new string value, new_s. |
|
- down(con) |
-
- CON |
-
- Fetch the first child of given concept. |
|
- up(con) |
-
- CON |
-
- Fetch the parent of the given concept. |
|
- prev(con) |
-
- CON |
-
- Fetch the left or previous sibling of concept. |
|
- next(con) |
-
- CON |
-
- Fetch the right or next sibling of concept. |
|
- nextattr(attr) |
-
- ATTR |
-
- Fetch the next attribute in a list of attributes |
|
- nextval(val) |
-
- VAL |
-
- Fetch the next value in a list of values. |
|
- getsval(val) |
-
- STR |
-
- Fetch value as a string from a numeric or - string-valued KB value object. |
|
- getstrval(val) |
-
- STR |
-
- Fetch the string value from a KB value object. |
|
- getfltval(val) |
-
- FLOAT |
-
- Fetch number from float VAL. |
|
- getnumval(val) |
-
- INT |
-
- Fetch number from numeric VAL. |
|
- getconval(val) |
-
- CON |
-
- Fetch concept from value. |
|
- Functions - that Create |
-
-
|
-
-
|
|
- makeconcept(parent, - name [, num] ) |
-
- CON |
-
- Make concept under given parent concept. Optionally - as the numth child of the parent. num==0 or absent places concept at end - of list of children. name is the name of new concept. |
|
- addattr(con, - attr_s) |
-
- ATTR |
-
- Add an attribute with no value to given concept. |
|
- addsval(con, - name, num) |
-
- NONE |
-
- Add numeric - value num as a string to concept con's attribute called name. |
|
- addstrval(con, - name, str) |
-
- NONE |
-
- Add str - as string value to concept con's attribute called name. |
|
- addnumval(con, - name, num) |
-
- NONE |
-
- Add num - as numeric value to concept con's attribute called name. |
|
- addconval(con, - name, con_val) |
-
- NONE |
-
- Add concept - value con_val to concept's name attribute. |
|
- getconcept(parent, - name) |
-
- CON |
-
- Get or - make named concept under parent. |
|
- addword(str) |
-
- CON |
-
- Add - dictionary concept to the dictionary within the KB, if not present. In - either case, fetch the dictionary concept for the word. |
|
- dictgetword(str) |
-
- CON |
-
- Same as addword; - more principled function name. |
|
- sortconsbyattr(arr_c, - attr_s, numeric_b, descending_b) |
-
- ARR |
-
- Given an array (multi-valued - variable) of KB concepts, sort the concepts by the given attribute. numeric_b - = 1 if num, 0 if string type attribute. descending_b - = 1 if descending order, 0 if ascending. E.g., -G("sorted") - = sortconsbyattr(G("cons"),"count",1,0); -will sort an array of KB - concepts by their "count" attribute in ascending order, assigning - a new sorted array to G("sorted"). The - given array in G("cons") is left unaltered. New - in 1.6 |
|
- Functions - that Move and Remove |
-
-
|
-
-
|
|
- rmconcept(con) |
-
- BOOL |
-
- Remove concept con from Knowledge Base. - Removes entire subhierarchy. |
|
- rmchild(con, str) |
-
- BOOL |
-
- Remove child named str from parent concept con. |
|
- rmchild(con, num) |
-
- BOOL |
-
- Remove number num - child of parent concept con. |
|
- rmvals(con, str) |
-
- BOOL |
-
- Remove attributes and - values of concept con's attribute - named str. |
|
- rmval(attr, val) |
-
- BOOL |
-
- Remove value val - from attribute attr. |
|
- rmattrval(con, str1, str2) |
-
- BOOL |
-
- Remove value named str2 from attribute named str1 under concept con. Also removes the attribute. |
|
- rmattrs(con) |
-
- BOOL |
-
- Remove concept's attributes (except for system - internal ones). |
|
- rmattr(con,name) |
-
- BOOL |
-
- Remove concept's named - attr and values. |
|
- rmchildren(con) |
-
- BOOL |
-
- Remove concept's children - and phrase. |
|
- rmword(str) |
-
- BOOL |
-
- Remove dictionary concept from KB. |
|
- prunephrases(hier) |
-
- BOOL |
-
- Remove all phrases from - given subhierarchy. |
|
- replaceval(con, - name, str) |
-
- NONE |
-
- Replace named attribute's value(s) with str. |
|
- replaceval(con, - name, num) |
-
- NONE |
-
- Replace - named attribute's value(s) with num. |
|
- replaceval(con, - name, con_val) |
-
- NONE |
-
- Replace - named attribute's value(s) with concept con_val |
|
- renameconcept(con, - name) |
-
- NONE |
-
- Rename - given concept to name. |
|
- renamechild(con, - num, name) |
-
- NONE |
-
- Rename - con's numth child concept to name. |
|
- renameattr(con, - name, new) |
-
- NONE |
-
- Rename - con's named attribute to new. |
|
- movecleft(con) |
-
- NONE |
-
- Move concept before previous sibling. (Moves - concept to the left in its list.) |
|
- movecright(con) |
-
- NONE |
-
- Move concept after next sibling. (Moves - concept to the right in its list.) |
|
- sortchilds(con) |
-
- NONE |
-
- Sort concept's immediate children alphabetically. |
|
- sorthier(con) |
-
- NONE |
-
- Sort concept's subhierarchy alphabetically. |
|
- Phrase - and Node Functions |
-
-
|
-
-
|
|
- findphrase(con) |
-
- PHR |
-
- Fetch concept's phrase. |
|
- sortphrase(con) |
-
- NONE |
-
- Sort concept's phrase nodes alphabetically. |
|
- phraselength(con) |
-
- INT |
-
- Get number of nodes in concept's phrase. |
|
- nodeconcept(node) |
-
- CON |
-
- Fetch the concept that node is a proxy for. - (Changed in 1.6) |
|
- nodeowner(node) |
-
- CON |
-
- Fetch the concept that owns the node's phrase. (NEW in 1.6) |
|
- findnode(phrase, - name) |
-
- CON |
-
- Find first named node in phrase. |
|
- findnode(phrase, - num) |
-
- CON |
-
- Find the numth node in phrase. |
|
- listnode(node) |
-
- CON |
-
- Fetch the first node in given node's list. |
|
- firstnode(phrase) |
-
- CON |
-
- Fetch the first node in phrase. |
|
- lastnode(phrase) |
-
- CON |
-
- Fetch the last node in phrase. |
|
- makephrase(con, - name) |
-
- PHR |
-
- Make a phrase in con by creating named - node. |
|
- addcnode(con, - name) |
-
- CON |
-
- Add named - node at end of con's phrase. |
|
- addnode(phrase, - name, num) |
-
- CON |
-
- Add named - node as numth in phrase. |
|
- rmnode(con) |
-
- NONE |
-
- Remove - node from concept's phrase. |
|
- rmphrase(phrase) |
-
- NONE |
-
- Remove phrase from its concept. |
|
- rmcphrase(con) |
-
- NONE |
-
- Remove a concept's phrase. |
|
- renamenode(phrase, - name, new) |
-
- NONE |
-
- Rename phrase's named node to new. |
|
- renamenode(phrase, - num, new) |
-
- NONE |
-
- Rename phrase's numth node to new. |
Formatting - and I/O Functions
- - - - - - - - - - diff --git a/Help/helps/Table_of_Math_Functions.htm b/Help/helps/Table_of_Math_Functions.htm deleted file mode 100644 index 286ac1c..0000000 --- a/Help/helps/Table_of_Math_Functions.htm +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - -NLP++ now features mathematical functions analogous to those provided - in C/C++.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- logten(num_float) |
-
- FLOAT |
-
- Get base 10 logarithm of given number. Analogous - to log10 function in C/C++. |
|
-
|
-
-
|
-
-
|
The functions used to operate on parse trees have been listed here in - table form for easy reference. For - examples of these functions, refer to the individual function pages included - in the Parse Tree Functions section.
- -The return types include: INT - (integer), PNODE (parse tree node), - STR (string), and VAR - VALUES (variable values). NONE - indicates nothing is returned.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- arraylength(VAR) |
-
- INT |
-
- Count number of values in given variable or - expr. (Like a call-by-reference) |
|
- eltnode(elt_num) |
-
- PNODE |
-
- Fetch the first node that matched the nth - element of a rule. |
|
- group(start_n,end_n,name_str) |
-
- PNODE |
-
- Perform a reduction in the @POST region. - Replaces - the old group action. (2.3.1.9 return the created node.) |
|
- inputrange(start_n,end_n) |
-
- STR |
-
- Return a substring of the input text as specified - by start and end offsets. |
|
- inputrange(start_n,end_n,out_ostr) |
-
- BOOL |
-
- Print a range of chars from the input text - to an output stream. |
|
- lasteltnode(elt_num) |
-
- PNODE |
-
- Fetch the last node that matched the nth element - of a rule. |
|
- phrasetext() |
-
- STR |
-
- Fetch the text that matched the right hand - side phrase of a rule. Analogous to $text. |
|
- phraseraw() |
-
- STR |
-
- Fetch the raw text that matched the right - hand side phrase of a rule. Analogous to $raw |
|
- pncopyvars(Pnode1,Pnode2) -pncopyvars(Pnode1,aConcept) -pncopyvars() -pncopyvars(aPnode) -pncopyvars(0) |
-
- NONE |
-
- Copy a node's variables to the suggested node - of a rule match, or to a concept in the KB hierarchy. Must be called from the POST Region and can be considered - a new-style NLP++ action. |
|
- pndeletechilds(pnode) |
-
- NONE |
-
- Delete children of given pnode. |
|
- pninsert(name, pnode, - after_n) |
-
- PNODE |
-
- Insert nonliteral node with name into parse - tree. If - after_n == 1, insert after pnode, else if 0 then before pnode. |
|
- pnmakevar(pnode, var_str, - val) |
-
- NONE |
-
- Make a variable for a given pnode. |
|
- pnname(pnode) |
-
- STR |
-
- Fetch the name of a pnode. |
|
- pnnext(pnode) |
-
- PNODE |
-
- Fetch a pnode's right sibling, if any. |
|
- pnpushval(pnode, var_str, - val) |
-
-
|
-
- Push a value onto pnode's variable. New in 2.7.3.2 |
|
- pnprev(pnode) |
-
- PNODE |
-
- Fetch a pnode's left sibling, if any. |
|
- pnrename(pnode, - str) |
-
- STR |
-
- Rename given pnode. Returns the interned name. |
|
- pnreplaceval |
-
- NONE |
-
- Replace the value of pnode's variable. |
|
- pnroot() |
-
- PNODE |
-
- Fetch the root of a parse tree. |
|
- pnrpushval(pnode, var_str, - val) |
-
-
|
-
- Push a value onto end of pnode's variable. - New in 2.7.3.2 |
|
- pndown(pnode) |
-
- PNODE |
-
- Fetch the child of a parse tree node. |
|
- pnsingletdown(pnode) |
-
- PNODE |
-
- Fetch the child of a parse tree node, obeying - rules about going down a "singlet chain." I.e., get child only - if no branching and if not going past node with BASE flag set. |
|
- pnup(pnode) |
-
- PNODE |
-
- Fetch a pnode's parent, if any. Only leftmost - pnode in a list has a parent. |
|
- pnvar(pnode, - var_str) |
-
- ARRAY |
-
- Fetch a pnode's variable value(s). |
|
- pnvarnames(pnode) |
-
- ARRAY |
-
- Fetch a node's variable names as an array. |
|
- varinlist(var_str, - elt_num) |
-
- ARRAY |
-
- Find var_str variable's value(s) in any pnode - that matched elt_numth element |
Formatting - and I/O Functions
- - - - - - - - diff --git a/Help/helps/Table_of_Special_Functions.htm b/Help/helps/Table_of_Special_Functions.htm deleted file mode 100644 index 6121f47..0000000 --- a/Help/helps/Table_of_Special_Functions.htm +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - -NLP++ has a set of special functions. These - have been listed here in table form for easy reference. For - examples of these functions, refer to the individual function pages included - in the Special Functions section.
- -The return types include: STR - (string), INT (integer), and BOOL (Boolean). Boolean type is currently - implemented by integer 1 (or non-zero) - for true and 0 - for false. NONE indicates - nothing is returned.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- batchstart() |
-
- BOOL(1,0) |
-
- Check if start of a batch analysis. True - if current file is first in a batch run. |
|
- debug() |
-
- BOOL(1,0) |
-
- No op. Convenient breakpoint for debugging - from C++ compiler. |
|
- exitpass() |
-
- NONE |
-
- Exit from the current pass file immediately, - without performing rule matching (if any). |
|
- exittopopup(message_str, |
-
- BOOL(1,0) |
-
- Exit from current pass, invoking a popup if - within VisualText. |
|
- fail() |
-
- NONE |
-
- In CHECK Region, abort the rule that has just - matched. Noop - elsewhere. See - succeed(). |
|
- findana |
-
- STR |
-
- See if named project is already resident in - memory. (New in 1.6) |
|
- getpopupdata() |
-
- STR |
-
- Get the data typed in by a call to exittopopup(). |
|
- hitconf(hits_num, total_num, - fudge_num) |
-
- INT (0 to 100) |
-
- Calculate the keyword density. Fudge - factor is typically 3 to 20. |
|
- interactive() |
-
- BOOL(1,0) |
-
- True if analyzer is being run in an interactive environment, e.g., inside - VisualText. |
|
- mkdir(dir_str) |
-
- BOOL(1,0) |
-
- Create a directory. Operating - system-dependent. |
|
- permuten(tot_num) |
-
- INT ARR |
-
- Permute integers 0 to (tot_num - 1) such that array element k will never - be equal to k. |
|
- succeed() |
-
- NONE |
-
- In CHECK Region and CODE Region, succeed without executing further code. - See fail(). |
|
- system(str) |
-
- BOOL(1,0) |
-
- Execute str as operating system command. |
|
- today() |
-
- STR |
-
- Format the current date and time as a string. |
|
-
|
-
-
|
-
-
|
Formatting - and I/O Functions
- - - - - - - - - - diff --git a/Help/helps/Table_of_Spelling_Functions.htm b/Help/helps/Table_of_Spelling_Functions.htm deleted file mode 100644 index b1b9fd2..0000000 --- a/Help/helps/Table_of_Spelling_Functions.htm +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - - -The NLP++ functions used to check spelling are listed here in table - form for easy reference. For - examples of these functions, refer to the individual function pages included - in the Spelling Functions section.
- -Return types can be STR (string), - INT (integer) or BOOL - (Boolean). Boolean - type is currently implemented by integer 1 - (or non-zero) for true and 0 for false.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- spellcandidates(word_str) |
-
- STR |
-
- Make a list of space separated candidates - for spell-correcting given word. |
|
- spellcorrect(word_str) |
-
- STR |
-
- Correct spelling of word. If word is not known, - returns best spelling guess. |
|
- spellword(word_str) |
-
- BOOL |
-
- Check if word is a known English word. |
|
- strspellcandidate(word_str, - list_str) |
-
- STR |
-
- Select best spell-correct candidate for a - word, given a list of space-separated candidates (as returned by spellcandidates, - e.g.) |
|
- strspellcompare(str1, - str2) |
-
- INT |
-
- Measure spelling "distance" between - two given words. The smaller the number, the fewer the corrections to - get from one to the other. |
Formatting - and I/O Functions
- - - - - -- - - - diff --git a/Help/helps/Table_of_String_Functions.htm b/Help/helps/Table_of_String_Functions.htm deleted file mode 100644 index c95a993..0000000 --- a/Help/helps/Table_of_String_Functions.htm +++ /dev/null @@ -1,1649 +0,0 @@ - - - - - - - - - - -
The NLP++ functions used to operate on strings are listed here in table - form for easy reference. For - examples of these functions, refer to the individual function pages included - in the String Functions section.
- -The return types include: STR - (string), STR ARRAY (string array), - INT (integer), and BOOL - (Boolean). Boolean - type is currently implemented by integer 1 - (or non-zero) for true and 0 for false. -
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- deaccent(str) |
-
- STR |
-
- Convert string to replace accented characters. |
|
- dejunk(str) |
-
- STR |
-
- Convert string to replace all but simple ASCII - chars. New in 2.6.0.3. |
|
- flt(str) |
-
- FLOAT |
-
- Convert string or int to float, if possible. |
|
- levenshtein(str1,str2) |
-
- INT |
-
- Levenshtein edit-distance between two strings. New in 2.0.2.9 |
|
- num(str) |
-
- INT |
-
- Convert string to number, if possible. (Also - accepts num arg). |
|
- split(str, char_str) |
-
- STR ARRAY |
-
- Split a string using the given char as separator. |
|
- stem(str) |
-
- STR |
-
- Compute stem of noun and verb. Return lowercase string. |
|
- strchar(str, - num) |
-
- STR |
-
- Index to numth char of string |
|
- strchr(str, - ch_str) |
-
- STR |
-
- Find first occurrence of char in string. Return - string headed by char. |
|
- strchrcount(str, ch_str) |
-
- INT |
-
- Count the occurrences of a character in a - string. |
|
- strclean(str) |
-
- STR |
-
- Remove leading, trailing, and repeat whitespace - separators. |
|
- strcontains(str1,str2) |
-
- BOOL |
-
- Check if str1is contained in str2. |
|
- strcontainsnocase(str1,str2) |
-
- BOOL |
-
- Check if str1 is contained in str2, ignoring - letter case. |
|
- strendswith(str, - suffix_str) |
-
- BOOL |
-
- Does given str ends with given suffix_str |
|
- strstartswith(str, - suffix_str) |
-
- BOOL |
-
- Does given str starts with given suffix_str |
|
- strequal(str1,str2) |
-
- BOOL |
-
- Check if str1 is identical to str2. |
|
- strisalpha(str) |
-
- BOOL |
-
- Check if str is all alphabetic chars. |
|
- strisdigit(str) |
-
- BOOL |
-
- Check if str is all numeric chars. |
|
- strislower |
-
- BOOL |
-
- Check if first char of string is lowercase |
|
- strisupper |
-
- BOOL |
-
- Check if first char of string is uppercase. |
|
- striscaps |
-
- BOOL |
-
- Check if the entire string is uppercase. |
|
- strnotequal(str1,str2) |
-
- BOOL |
-
- Check if str1 differs from str2. |
|
- strequalnocase(str1,str2) |
-
- BOOL |
-
- Check if str1 is identical to str2, ignoring - letter case. |
|
- strnotequalnocase(str1,str2) |
-
- BOOL |
-
- Check if str1 differs from str2, ignoring - letter case. |
|
- strlessthan(str1,str2) |
-
- BOOL |
-
- Check if str1 is lexically before str2. |
|
- strgreaterthan(str1,str2) |
-
- BOOL |
-
- Check if str1 is lexically after str2. |
|
- strlength(str) |
-
- INT |
-
- Return length of string. |
|
- strpiece(str, - start_num, end_num) |
-
- STR |
-
- Fetch substring of string from start_num to - end_num indexes. Zero-based |
|
- struniquechars(str) |
-
- STR |
-
- Find all the unique characters in a string. |
|
- strrchr(str, - ch_str) |
-
- STR |
-
- Find last occurrence of char in string. Return - string headed by char |
|
- strsubst(str, - old_str, new_str) |
-
- STR |
-
- Replace substring old_str of a string str - with new_str. |
|
- strtolower(str) |
-
- STR |
-
- Convert string to lowercase. |
|
- strtotitle(str) |
-
- STR |
-
- Convert string to title capitalization. |
|
- strtoupper(str) |
-
- STR |
-
- Convert string to uppercase. |
|
- strtrim(str) |
-
- STR |
-
- Remove leading and trailing whitespace from - str. |
|
- strwrap(str, - num) |
-
- STR |
-
- Break string at specified length. |
|
- str(num) |
-
- STR |
-
- Convert numeric value to string. (Also accepts string arg). |
|
- strescape(str, charsToEscapeStr, escapeStr) |
-
- STR |
-
- Escape characters in string. |
|
- strunescape(str, escapedCharsStr, - escapeStr) |
-
- STR |
-
- Unescape characters in string. |
|
- suffix(wordStr, suffixStr) |
-
- BOOL |
-
- True if suffixStr may be the suffix of wordStr. |
|
- unpackdirs(dir_str) |
-
- STR ARRAY |
-
- Unpack directory names from a full directory path string. |
|
- xmlstr(str) |
-
- STR |
-
- Convert chars to appropriate chars for an XML/HTML file. |
|
-
|
-
-
|
-
-
|
Formatting - and I/O Functions
- - - - - - - - diff --git a/Help/helps/Table_of_Web_Functions.htm b/Help/helps/Table_of_Web_Functions.htm deleted file mode 100644 index afc49f7..0000000 --- a/Help/helps/Table_of_Web_Functions.htm +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - -NLP++ functions are provided to help process web pages.
- -Note: The User - Project within each analyzer project includes the functions user::analyzefile - and user::analyzebuf. In - concert with the NLP++ web functions, a web traversal capability can be - built and run within VisualText. (E.g., - a web crawler or web spider.) By - integrating web traversal with HTML web page analysis, one may construct - a focused or intelligent web crawler.
- - -|
- FUNCTION - NAME |
-
- RETURNS |
-
- DESCRIPTION |
|
- resolveurl(base_str,embed_str) |
-
- STR |
-
- Create an absolute URL from embed_str, using - base_str as a base URL. |
|
- urlbase(url_str) |
-
- STR |
-
- (Superseded by resolveurl) Fetch a normalized, - partial URL ending in a directory path. Aids - in resolving relative URLs within a web page. - (New in 1.6) |
|
- urltofile(url_str,file_str) |
-
- NONE |
-
- Fetch the web page specified by the url_str - into a file located at file file_str on the local machine. (New - in 1.6) |
|
-
|
-
-
|
-
-
|
- - - - diff --git a/Help/helps/Text_Analysis_International/About_Text_Analysis_International.htm b/Help/helps/Text_Analysis_International/About_Text_Analysis_International.htm deleted file mode 100644 index b24b98a..0000000 --- a/Help/helps/Text_Analysis_International/About_Text_Analysis_International.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -
The mission of Text Analysis International (TAI) is to revolutionize - the way in which people process text.
- -TAI was founded in 1998 to develop technologies to analyze text deeply, - accurately, and extensibly. VisualText embodies that technological approach, - enabling a Natural Language Engineering (NLE) methodology for developing - text analyzers. With NLE, the user controls the order of execution, the - contexts to be worked in, and the actions to be taken in every step of - the analysis of a text.
- -TAI's goals include an ever-greater degree - of automation in the analysis of text, but always with a pragmatic, rather - than theoretical, foundation. TAI is developing standardized bodies of - knowledge, methods for text analysis, and diverse applications as it broadens - its core technology. Rather than championing any particular paradigm, - TAI seeks to exploit all paradigms and methods and to integrate methods - wherever useful. Rather than over-committing to keyword, statistical, - neural network, pattern, recursive grammar, or other approaches, TAI seeks - to encompass all these approaches and more within its product sets.
- - - - diff --git a/Help/helps/Text_Analysis_International/Contact_Information.htm b/Help/helps/Text_Analysis_International/Contact_Information.htm deleted file mode 100644 index d4ebdee..0000000 --- a/Help/helps/Text_Analysis_International/Contact_Information.htm +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - - - -Contacting Text Analysis International, Inc.
- -Address:
- -Text Analysis International, Inc.
-1669-2 Hollenbeck Ave. #501
-Sunnyvale, CA 94087
Email:
- - -|
- Department |
-
- Email Address |
|
- Technical Support |
-- |
|
- Documentation Feedback |
-- |
|
- Sales and Marketing |
-- |
|
- Corporate |
-- |
- -
Telephone:
- - -|
- Department |
-
- Telephone - Number |
|
- Corporate, - Sales and Marketing |
-
- 1-877-235-6259 (USA - toll free) |
|
- Technical - Support |
-
- 949-376-8507 |
|
-
|
-
-
|
Please check for updates to this information - at our website,
- - - -- - - - diff --git a/Help/helps/Text_Tab_Popup.htm b/Help/helps/Text_Tab_Popup.htm deleted file mode 100644 index 94bb2eb..0000000 --- a/Help/helps/Text_Tab_Popup.htm +++ /dev/null @@ -1,1226 +0,0 @@ - - - - - - - - - - -
The Text Tab Popup menu is launched by right clicking in the Text Tab - Window.
- -
|
- Menu Item |
-
- Description |
| - | -
- Submenu for adding new or existing text files - to a project, a new folder under a selected folder, or a new top level - folder. (See below.) |
|
- Attributes |
-
- Launches the Attribute - Editor dialog and displays the attributes belonging to the selected - file or folder in the Text Tab. User has option to delete, add or change - names of attributes and values. |
|
- Move to Top - Level |
-
- Moves selected folder to the top level (i.e. - leftmost edge) of the Text Tab. |
|
- Refresh |
-
- Refreshes the Text Tab display. |
|
- Delete |
-
- Deletes selected file or folder in the Text - Tab. |
|
- Delete Children |
-
- Deletes the children of a selected folder - but keeps the folder itself. |
|
- Delete Logs |
-
- Deletes selected log file. Each log file contains - a representation of one pass of the analyzer sequence. When archiving - an analyzer by creating a zip file, there's no need to save the intermediate - parse files since these files can always be regenerated. Delete Logs can - be used to remove these files before archiving. |
| - | -
- Submenu to perform dictionary related functions. - (See below.) |
|
- Edit/View |
-
- Displays selected file in the Workspace. Same - effect as double clicking on the file. |
|
- Rename |
-
- Launches a dialog box to rename selected file - or folder. |
| - | -
- Submenu for accessing VisualText tools. (See below.) |
| - | -
- Opens a browser for selected html file. |
|
- Update Webpage(s) |
-
- Updates selected URL(s). |
| - | -
- Displays selected html file as a web page. |
| - | -
- Submenu for archiving Text Tab files and folders. - (See below.) |
|
- Run Analyzer |
-
- Runs analyzer on selected file. Same function - as selecting the Run - button on the Workspace Toolbar and Run - from the Analyzer - Menu. |
|
- Help |
-
- Launches VisualText Help documentation. |

|
- Menu Item |
-
- Description |
|
- Existing - Text File |
-
- Displays Open dialog to select path and name - of existing file. |
|
- Folder |
-
- Displays prompt to enter new folder name. |
|
- New Text - File |
-
- Displays prompt to enter new file name. |
| - | -
- Submenu for adding a folder or file to the - top level (i.e. leftmost edge) of the Text Tab. |

Add an existing file, a new file, or a folder to the top level of the - Text Tab. The items in this menu are analogous to the items in the Text Tab Popup > Add menu.
- -The Dictionary menu option allows you to perform dictionary related - functions.
- -
|
- Menu Item |
-
- Description |
|
- Add Words |
-
- Adds the words in a selected file to the dict - hierarchy in the Knowledge Base. Only - single words can be added to the dictionary. (If - a word list contains a phrase, only the first word of the phrase is added.) - File name - and words added to the dict hierarchy are displayed in the Log Window. - |
|
- Lookup |
-
- Selecting Lookup displays the online dictionaries - specified in the Dictionary Lookup Preferences tab. Selecting - an option in the Lookup menu starts a search in the online dictionary - source. See - Dictionary - Lookup for more information on using this tool. |
- -

- - -
|
- Menu Item |
-
- Description |
| - | -
- Displays the ASCII - Table. ASCII Table displays the decimal and hexadecimal numbers and - their corresponding ASCII characters. |
|
- Character Viewer |
-
- Displays the Character - Viewer for the selected file. Character Viewer shows the line number, - cumulative count of total characters seen per line, characters on a line, - and ASCII characters for each line of text in selected file. Under each - line is the hexadecimal value of each character above it. |
| - | -
- Activates the Dictionize - Tool. |
|
- Email Tool |
-
- Launches the Email - Tool. Email Tool enables sending email directly from the VisualText - interface. |
|
- Hex Viewer |
-
- Launches the Hex - Viewer. |
| - | -
- Activates the Jumble - Tool. This - tool jumbles the letters in words in a text file. This - tool is useful when looking for structural clues in a text, since it removes - distracting content. Paragraph - and sentence structure are preserved. |
| - | -
- Activates the Mask - Tool. This - tool takes alphabetic content of a text with strings of the single letter - 'a', but leaves the form, the non-alphabetic structure, including punctuation - and white spaces. This tool is useful when looking for structural clues - in a text, since it removes distracting content. |
|
- Text File Info |
-
- Displays the Text - File Info dialog. This tool provides statistics about the selected - text file, including creation date, character, word and line counts. |
- -
Text Archive is used to view - and create archives of the text files in the Text Tab either on remote - servers or on local machines. Archiving - is used to create quick backups of your work and to facilitate communication - between developers working on the same analyzers. To - set archiving preferences, select Preferences - under the File Menu and click on the Archiving - tab.
- -
|
- Menu Item |
-
- Description |
|
- Archive Local |
-
- Launches a dialog box to create a local archive - of the current files and folders in the Text Tab hierarchy. The name of - the archive defaults to the name of the current analyzer suffixed with - the current date and time. |
|
- Archive Remote |
-
- Launches a dialog box to create a remote archive - of files the Text Tab. The name of the archive file defaults to the name - of the current analyzer suffixed with the current date and time. Archive - is created on the remote server. |
|
- View Local |
-
- Displays local archives in the Text Archive - > View Local dialog. Presents options to delete, rename, upload (send - to server) or load into current analyzer Workspace. Listings - in archive can be sorted by clicking on column headers. |
|
- View Remote |
-
- Displays server archives in the Text Archive - > View Remote dialog. Presents options to delete, rename, download - (send to local archive) or load into current analyzer Workspace. Listings - in the archive can be sorted by clicking on column headers. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/Toolbar_buttons/attr_edit_button.gif b/Help/helps/Toolbar_buttons/attr_edit_button.gif deleted file mode 100644 index 78abca9..0000000 Binary files a/Help/helps/Toolbar_buttons/attr_edit_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/attr_edit_input.gif b/Help/helps/Toolbar_buttons/attr_edit_input.gif deleted file mode 100644 index 0dc1463..0000000 Binary files a/Help/helps/Toolbar_buttons/attr_edit_input.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/attr_edit_search.gif b/Help/helps/Toolbar_buttons/attr_edit_search.gif deleted file mode 100644 index 4560085..0000000 Binary files a/Help/helps/Toolbar_buttons/attr_edit_search.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/browser_back_button.gif b/Help/helps/Toolbar_buttons/browser_back_button.gif deleted file mode 100644 index d3c9f0e..0000000 Binary files a/Help/helps/Toolbar_buttons/browser_back_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/browser_forward.gif b/Help/helps/Toolbar_buttons/browser_forward.gif deleted file mode 100644 index 8c9ab46..0000000 Binary files a/Help/helps/Toolbar_buttons/browser_forward.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/browser_stop_button.gif b/Help/helps/Toolbar_buttons/browser_stop_button.gif deleted file mode 100644 index 0ec4d7b..0000000 Binary files a/Help/helps/Toolbar_buttons/browser_stop_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/copy_button.gif b/Help/helps/Toolbar_buttons/copy_button.gif deleted file mode 100644 index 6aa1004..0000000 Binary files a/Help/helps/Toolbar_buttons/copy_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/cut_button.gif b/Help/helps/Toolbar_buttons/cut_button.gif deleted file mode 100644 index 00cefed..0000000 Binary files a/Help/helps/Toolbar_buttons/cut_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/delete_in_tab_win_button.gif b/Help/helps/Toolbar_buttons/delete_in_tab_win_button.gif deleted file mode 100644 index f267f71..0000000 Binary files a/Help/helps/Toolbar_buttons/delete_in_tab_win_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/find_next_button.gif b/Help/helps/Toolbar_buttons/find_next_button.gif deleted file mode 100644 index da49df3..0000000 Binary files a/Help/helps/Toolbar_buttons/find_next_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/find_previous_button.gif b/Help/helps/Toolbar_buttons/find_previous_button.gif deleted file mode 100644 index 8b81b86..0000000 Binary files a/Help/helps/Toolbar_buttons/find_previous_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/generate_dirty_button.gif b/Help/helps/Toolbar_buttons/generate_dirty_button.gif deleted file mode 100644 index cea6724..0000000 Binary files a/Help/helps/Toolbar_buttons/generate_dirty_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/new.gif b/Help/helps/Toolbar_buttons/new.gif deleted file mode 100644 index 253bd0e..0000000 Binary files a/Help/helps/Toolbar_buttons/new.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/new_browser_button.gif b/Help/helps/Toolbar_buttons/new_browser_button.gif deleted file mode 100644 index 6471492..0000000 Binary files a/Help/helps/Toolbar_buttons/new_browser_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/open_button.gif b/Help/helps/Toolbar_buttons/open_button.gif deleted file mode 100644 index 3079a45..0000000 Binary files a/Help/helps/Toolbar_buttons/open_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/paste_button.gif b/Help/helps/Toolbar_buttons/paste_button.gif deleted file mode 100644 index 9e7351a..0000000 Binary files a/Help/helps/Toolbar_buttons/paste_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/print_button.gif b/Help/helps/Toolbar_buttons/print_button.gif deleted file mode 100644 index 0cbe647..0000000 Binary files a/Help/helps/Toolbar_buttons/print_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/run_next_button.gif b/Help/helps/Toolbar_buttons/run_next_button.gif deleted file mode 100644 index 71425d8..0000000 Binary files a/Help/helps/Toolbar_buttons/run_next_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/save_all_button.gif b/Help/helps/Toolbar_buttons/save_all_button.gif deleted file mode 100644 index f898f46..0000000 Binary files a/Help/helps/Toolbar_buttons/save_all_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/save_url_text_buttonl.gif b/Help/helps/Toolbar_buttons/save_url_text_buttonl.gif deleted file mode 100644 index ac9bcc2..0000000 Binary files a/Help/helps/Toolbar_buttons/save_url_text_buttonl.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/slog_button.gif b/Help/helps/Toolbar_buttons/slog_button.gif deleted file mode 100644 index a8d9bca..0000000 Binary files a/Help/helps/Toolbar_buttons/slog_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/stop_analyzer_button.gif b/Help/helps/Toolbar_buttons/stop_analyzer_button.gif deleted file mode 100644 index 728dbcf..0000000 Binary files a/Help/helps/Toolbar_buttons/stop_analyzer_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/toggle_batch_mode_button.gif b/Help/helps/Toolbar_buttons/toggle_batch_mode_button.gif deleted file mode 100644 index 74deb18..0000000 Binary files a/Help/helps/Toolbar_buttons/toggle_batch_mode_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/toggle_find_win_button.gif b/Help/helps/Toolbar_buttons/toggle_find_win_button.gif deleted file mode 100644 index 400c83c..0000000 Binary files a/Help/helps/Toolbar_buttons/toggle_find_win_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/toggle_log_win_button.gif b/Help/helps/Toolbar_buttons/toggle_log_win_button.gif deleted file mode 100644 index 5440f36..0000000 Binary files a/Help/helps/Toolbar_buttons/toggle_log_win_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/toggle_tab_win_button.gif b/Help/helps/Toolbar_buttons/toggle_tab_win_button.gif deleted file mode 100644 index c7ea673..0000000 Binary files a/Help/helps/Toolbar_buttons/toggle_tab_win_button.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/view_pass_file.gif b/Help/helps/Toolbar_buttons/view_pass_file.gif deleted file mode 100644 index 1b8d6c3..0000000 Binary files a/Help/helps/Toolbar_buttons/view_pass_file.gif and /dev/null differ diff --git a/Help/helps/Toolbar_buttons/view_web_page_button.gif b/Help/helps/Toolbar_buttons/view_web_page_button.gif deleted file mode 100644 index d7c8715..0000000 Binary files a/Help/helps/Toolbar_buttons/view_web_page_button.gif and /dev/null differ diff --git a/Help/helps/Tutorials/Tutorial_Introduction.htm b/Help/helps/Tutorials/Tutorial_Introduction.htm deleted file mode 100644 index c6f8da0..0000000 --- a/Help/helps/Tutorials/Tutorial_Introduction.htm +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - -
Six tutorials guide you through the basics of VisualText™. You should - follow them in order; each takes about an hour.
- -The tutorials generally build on each other, so that the analyzer used - in Tutorial 2 is the one that was created in Tutorial 1. Because - of this, if you change file names, variable names, etc., from what is - presented in a tutorial, later tutorials may not work as described. However, - the release provides six tutorial analyzer projects, one for each tutorial, - so that you could start Tutorial 2 with the analyzer built by Tutorial - 1, and so on.
- -NOTE: In some versions of - VisualText, the zipped tutorial analyzers are absent or obsolete, so it - is best to start from scratch with Tutorial 1.
- -The tutorial analyzer projects are in folders named
- -C:\Program Files\TextAI\VisualText\docs\tutorialN
- -where N is the tutorial number. So, for - example, the analyzer created by following Tutorial 1 resides at
- -C:\Program Files\TextAI\VisualText\docs\tutorial1\myAnalyzer1.zip
- -(Note: The assumed installation location is C:\Program Files. The exact - path to these files will of course depend on where you installed the software.) - If you do not have decompression software to access these files, you can - download WinZip from a website such as:
- -http://www.winzip.com
- -If you need to look at working code or start a new tutorial in sync - with the documentation, you can copy the tutorial analyzer in question - out of the docs folder in the install directories and into the working - directory. We've set up the working directory for the tutorial analyzers - to be:
- -C:\apps\myAnalyzerFolder\
- -Suppose you wanted to start Tutorial 3 with a clean copy of the analyzer - created in Tutorial 2. You would go to the install directory containing - the zipped tutorial, in this case:
- -C:\Program Files\TextAI\VisualText\docs\tutorial2
- -and unzip the myAnalyzer2.zip - file. (When unzipping your files, it is best to keep the unzipped files - in a different directory than the working directory.) When you unzip the - file, it uncompresses to the folder called myAnalyzer.
- -Place the myAnalyzer folder - into the working directory:
- -C:\apps\myAnalyzerFolder\
- -Since the first tutorial starts from scratch, you cannot start out Tutorial - 1 in this way.
- -Here are a few extra notes before starting the tutorials.
- -You can view the Help documentation outside of - VisualText. You - can find it in the Start button under Programs, or at the location
C:\Program Files\TextAI\VisualText\Help.chm
- -The toolbars and windows presented in this tutorial - are assumed to be in the same position as they are when you first launch - VisualText. As you will learn in the Interface section, toolbars and windows - can be moved around to different locations. If you have experimented with - the VisualText interface before starting this tutorial, the toolbar graphics - may not precisely match what you see in these tutorials.
The right-arrow symbol, such
- as the one at the beginning of this line, points you to the next action
- you have to take in executing a tutorial.
Six tutorials guide you through the basics of creating an analyzer. - Along the way, you will also be introduced to various tools and aspects - of the VisualText work environment. Below is a description of each tutorial. - You may - find it useful to scan through the tutorials to familiarize yourself with - the content before actually starting the tutorials.
- -Tutorial 1: - Creating new analyzers
Tutorial 2: - Sampling data and automatically generating analyzer rules
Tutorial 3: - Creating analyzer rules by hand
Tutorial 4: - Using input and output files
Tutorial 5: - Introduction to NLP++™
Tutorial 6: - Working with rule types and rule construction
- -
- - - - diff --git a/Help/helps/Tutorials/tutorial1/tutorial.html b/Help/helps/Tutorials/tutorial1/tutorial.html deleted file mode 100644 index 13545be..0000000 --- a/Help/helps/Tutorials/tutorial1/tutorial.html +++ /dev/null @@ -1,1002 +0,0 @@ - - - - - - - - - - -
In Tutorial 1, you create and run a simple text analyzer. You give the - analyzer a name and a location, select an initial template, and save the - analyzer. Then you exit VisualText™ and reload the analyzer you created. - We also introduce the Tab Window and the Log Window portions of the interface - and explain how to create an input file. Finally, you run the analyzer - and view the parse tree, which holds the patterns matched in a text.
- -
Launch VisualText by double clicking on the VisualText
- icon on your desktop (or from Start button > TextAI > VisualText).
- You should see the following screen:

If your toolbar area does not look like the above, right-click
- the mouse in the toolbar area, then enable all the toolbars. We
- recommend rearranging them as shown.
Take a moment to familiarize yourself with the interface, which divides - into three general areas: toolbars, windows, and a workspace.
- -The various toolbars give you access to commonly used functions. - In Tutorial 1 you will mostly be working with the Main Toolbar. (See the - Interface - Overview section for the naming of the VisualText components).
- -At the bottom of the Main Window, you'll see the Log Window and the - Find Window (VisualText 2 separates these into tabs). This is where you - will be creating and monitoring your analyzer. You will learn more about - the Main Window later in this tutorial. The Workspace is where you can - view and manipulate files and tools for building and running text analyzers. - For more details on the function of all of the windows, toolbars and menus, - see the Interface - section of this manual.
- -Now, let's create a new analyzer.
- -
Select File > New
- Analyzer from the Main Menu. Note the title bar "VisualText
- - (no analyzer currently loaded)" below:

A New Analyzer dialog box appears.
- -
Give the analyzer the name myAnalyzer.
For location, give the following path C:\apps\myAnalyzerFolder
For template, choose
- Bare.
A template is a starter or skeletal analyzer that you can copy and modify. - The Bare template analyzer is a minimal analyzer and with a single pass called - tokenize. The tokenize pass is discussed later in this tutorial.
- -
Click OK. You now see a VisualText splash
- screen appear on the screen.
After a few seconds, the VisualText title - bar reads "VisualText - myAnalyzer."
- -When new analyzers are created, VisualText makes a directory structure - in the working directory. For this analyzer, VisualText created the following - directory structure in c:\apps:
- -
This folder structure houses all the information - needed to run the analyzer, including folders for input and output, a - folder for the knowledge base, etc. The analyzer you just created, myAnalyzer, - refers to this entire directory structure. The set of related files and - directories under myAnalyzer is called a project - in VisualText and other development environments. For a detailed description - of an analyzer project, see Structure of - Analyzer Projects.
- -One important file automatically generated - in the myAnalyzer folder is myAnalyzer.ana, - which organizes your project. When you load an analyzer, you do so by - opening the myAnalyzer.ana file.
- -Now we exit the program. (Note - that the Help should stay as-is, as a separate program.) Launch - VisualText again to continue with Tutorial 1.
- -
Select File
- > Exit from the Main Menu.
To load the analyzer you
- just created, invoke VisualText and select File
- > Open Analyzer.

Use the Open dialog to navigate
- to C:\apps\myAnalyzerFolder\myAnalyzer:

Select myAnalyzer.ana,
- then select Open.
This step loads the analyzer.
- -Once an analyzer is open, be careful to - distinguish between File > Open... - which opens a file into the Workspace area, and File - > Open Analyzer, which enables you to close the current analyzer - project and browse to an .ana file of another project.
- -Three large windows comprise the analyzer - work area: the Log Window, located in the lower left corner of the VisualText - interface, the Tab Window located in the upper left portion of the interface - and the Find Window located in - the lower right corner. You can resize, dock and dismiss these windows - as you choose. If you close a window and want to reopen it, use - the toggle buttons on the main menu toolbar:
- -![]()
The leftmost button toggles the Tab Window.
- -The left hammer toggles the Log Window while - the right hammer toggles the Find Window.
- -The Log Window gives you some basic information - about an analyzer when you open it. It also displays information about - rules as they are processed and applied to text you are analyzing.
- -
Here it displays the time it took to load - the minimal analyzer (myAnalyzer) and its associated knowledge base (KB).
- -When an error occurs or other information - needs to be reported to the user, it is displayed in the Log Window. For - typical messages displayed in the Log Window, refer to Log - Window Messages.
- -There are three tabs in the Tab Window: - Gram, Ana and Text.
- -
Gram is where you manage samples taken - from input texts.
Ana is where you control the text analyzer - sequence, passes, and pass files.
Text - is where you manage text input and output files.
VisualText is an integrated development - environment (IDE) for creating text analyzers. It gives you access to - all the machinery you need to create an analyzer in a single framework. - The Gram, Text and Ana tabs are essential parts of the machinery. Generally - speaking, you view and manage the input and output files through the Text - Tab; the text analyzer sequence, passes, and manually-edited rules in - the Ana Tab; and the automatically-generated rules in the Gram Tab.
- -The Tab Window can be resized by dragging - the right edge of the window towards the left. When resizing the window - hides one of the tabs, you can use the toggle arrows to find it.
- -
Familiarize yourself with
- each of the tabs in the Tab Window, by selecting the tab (Ana, Gram or
- Text) and with the cursor in the window (not directly on the tab), right
- clicking to bring up the popup menu.
You'll be working with a few of these popup - menu items in this tutorial. But for a detailed list of the various functions - available in the Tab Window, see Popup Menus - in the Interface section of this guide.
- -
Click on the Gram
- Tab and then on the Text Tab.
Notice that nothing is contained in either - of these tabs. By default, these two tabs are left empty. As you add input - texts, analyze them, and sample information from the texts, you will create - data in these two areas.
- -
Now click on the Ana
- Tab.
Notice that it is not empty. - The Ana Tab comes with - a built-in default pass, the tokenize - pass. A pass is a discrete step in the text analyzer, with its own - pass algorithm. The main pattern-matching - pass type in VisualText (called pat) - uses a pass file, which consists - of NLP++™ code and rules. NLP++ is a general purpose programming language - that is integrated with both a grammar and a hierarchical knowledge base - management system (KBMS). This tight, three-way coupling is ideal for - developing text analysis applications. NLP++ code can manipulate the parse - tree and attach information to it, as well as access and modify knowledge - used during text analysis.
- -The tokenize - pass algorithm is a system pass and does not have an associated pass file. - Tokenize executes first, traversing - the input text to convert it to a structure called a parse - tree. As - you add new passes to the Ana Tab, they become part of the stepwise sequence - executed when the text analyzer runs on an input text. Each pass typically - updates the parse tree with patterns that it identifies. As we'll see, - NLP++ enables a pass to also manipulate the information in the parse tree - and the KB.
- -The last of the Main Windows is the Find Window. It is used to display - search results when running a search on texts. Since we don't have any - text to search yet, we won't be able to use this window now.
- -Now we need some text to analyze. - In VisualText you have the option to use existing text files or to create - new text files. For this tutorial, we'll create a text file from scratch.
- -
Click the Text
- Tab.
Then, with the cursor in the white area - of the Text Tab, right click in the window to bring up the Text Tab Popup - Menu.
- -
Select Add
- > New Text File:

Name the file eg1
- (and don't include an ending such as .txt).
Click OK.
Notice that a file called eg1.txt - has been added to the Workspace and that the file has also been added - in the Text Tab. The default extension .txt is automatically added to - the file name. "input" - after the file name indicates the file is located in the input folder.
- -In addition to text files, you can use binary - or formatted text files such as html as input.
- -Your Tab Window and Workspace should look - like this:
- -
Now, type the following text
- in the eg1.txt file:
The quick brown fox jumped over the lazy yellow dog.
-John gave the book to Mary.
-Susan kissed the little baby's cheek.
An asterisk * - is added to the top of the file indicating the file has changes which - have not been saved.
- -
To save the file, put the
- cursor in the body of the text file and right click to launch the Text
- File Popup Menu:

Select Save.
You can also save files in the Workspace
- with the Save button
located on the Main Toolbar.
The file is written to the following directory:
- -C:\apps\myAnalyzerFolder\myAnalyzer\input
- -When you are supplying your own files, you - would copy them into this same directory.
- -If you do add existing text files to the - directory, it will be necessary to refresh the Text Tab. You can refresh - by putting your cursor inside the Text Tab Window, right clicking and - selecting Refresh from the Text - Tab Popup Menu. Note that in this case you will get a dire-looking message - saying that "all knowledge associated with text files" will - be lost if you refresh. You can safely ignore that message and continue - to refresh. (It refers to attribute knowledge that one could add to text-file - concepts in the knowledge base.)
- -Now that we have some text, we are ready - to run the analyzer. Recall that the analyzer at this point is made up - of one default rule pass: tokenize.
- -So that you can see each step in the analyzer
- sequence, select Generate Logs
- button
on the Workspace Toolbar.
- (When the button is depressed, it appears indented.) When you run an analyzer
- with Generate Logs on, log files will be created so that you can get detailed
- information about each step of the analyzer sequence, which can help you
- debug your analyzer. You'll learn more about generating logs in later
- tutorials.
Select eg1.txt
- in the Text Tab.
Click the Run
- button
on the Workspace Toolbar to "run" the analyzer.
Notice that information about the application - of rule passes is displayed in the Log Window. - Here it lets you know the name of the text being analyzed and the - date the file is processed.
- -We recommend keeping the Verbose
- Mode
button TURNED OFF, as it has no useful function
- at present. It is always a good idea to check the Log Window when creating
- your analyzer since this is where error messages will show up.
Now that we applied the tokenize pass to - the input file, we can look at one output of the analysis, called - the parse tree.
- -When the analyzer is run on a text, it first - converts the sequence of characters to "tokens" or "lexemes" - and places them under a root. This - constitutes the initial parse tree. Subsequent - passes modify the parse tree as they match new patterns within it. A - parse tree is similar to the sentence diagramming taught in elementary - school where you break a sentence down into parts such as nouns, verbs, - noun phrases, verb phrases, subjects, objects, etc. Each - pass in a VisualText analyzer takes as input the accumulated parse tree - built by all the prior passes.
- -There'll be a lot more information about - passes and trees later on in these tutorials, but for now, let's take - a look at the parse tree you just built for the eg1.txt file.
- -
Select eg1.txt
- in the Workspace.
Right click to bring up the
- Text File
- Popup Menu.
Select View
- > Parse Tree:

VisualText displays a parse tree for the - text file in a new window.
- -
Notice the title of the window, 'eg1.txt: - _ROOT [1 tokenize 0-119]' and the graphic that precedes the title, the - parse tree graphic. The title lets you know that this is the parse tree - for the file eg1.txt and it corresponds to the first pass in our analyzer - sequence (1 tokenize) and also that 119 characters were tokenized. If - you don't have 119 this just means that there may have been some extra - spaces or carriage returns in your file.
- -The parse tree consists of nodes. - Each line in the parse tree represents a single node. Our parse tree starts - with the node - _ROOT. The root of the parse tree covers the entire input text.
- -Nodes 'contain' text and other nodes and - are said to be either terminal or non-terminal. A node is non-terminal - if it dominates other nodes and terminal if it does not. As you can see, - there is only one non-terminal node in our parse tree, _ROOT. All of the - elements in our sentences, right down to the punctuation are dominated - by _ROOT. The other nodes in our parse tree are terminal nodes. The terminal - nodes are like the 'leaves' or end point of the tree and do not dominate - anything else.
- -Each terminal node contains the following: - the node name, the token type and the text from the file. The first terminal - node under ROOT is 'The::[alpha] The'. This means that the input text - has as its first terminal node 'The' and that the text 'The' is a sequence - of alpha characters. The next terminal node in the file is \_ which means - a white space, ie the white space after the word 'The'. (More on the literal - use of \ will be discussed in later tutorials.)
- -As you may have found, you can distinguish - between terminal and non-terminal nodes by the symbols used in the parse - tree. The non-terminal nodes are indicated by an arrow and the terminal - nodes are indicated by a thin, rectangular bar. A non-terminal node will - be blue when selected and grey otherwise. A terminal node is red unless - it is selected at which time it will turn blue. You can collapse and expand - nodes by clicking on the + and - symbols.
- -If you want to see the details of the analyzer - run, you can look at the log files located under the eg1.txt file in the - Text Tab Window.
- -
Click the "X"
- in the upper right-hand corner of the eg1.txt and parse tree files to
- close them.
Exit the analyzer by selecting
- File > Exit.
(In some versions) answer
- No at the confirmation prompt
- for saving the knowledge base.
In - this tutorial, we created an analyzer, gave it a name and a location, - selected a template, saved it, exited and reloaded it. We introduced the - Tab Window with the Text Tab, Ana Tab and Gram Tab. We looked at the Log - Window, then gave our analyzer some text to analyze. Finally, we analyzed - the text using the default system pass tokenize and viewed the resultant - parse tree.
- - - - diff --git a/Help/helps/Tutorials/tutorial2/tutorial2.html b/Help/helps/Tutorials/tutorial2/tutorial2.html deleted file mode 100644 index d14313a..0000000 --- a/Help/helps/Tutorials/tutorial2/tutorial2.html +++ /dev/null @@ -1,1480 +0,0 @@ - - - - - - - - - - -In Tutorial 1, you saw an analyzer with a single pass, the tokenize - pass. Recall that the tokenize pass is nothing more than a set of rules - and instructions that tell the analyzer what to do. In Tutorial 2, we - will learn more about generating rules in VisualText™ to create passes - in the analyzer sequence.
- -VisualText supports two basic ways of generating rules in pass files: - hand-built and automatic. In this tutorial, we introduce automatic - rule generation. Automatic rule generation results in the automatic creation - of passes in the analyzer sequence. In order to do this, we will also - learn about adding and sampling texts. Any text analyzer can be easily - enhanced by adding samples as shown in this tutorial. Here are the steps - for setting up this capability:
- -Create a placeholder, or stub, for the automatically generated passes
Create a set of concepts, each representing a set of - rules
Populate the concepts - with samples
After we have VisualText generate our rules, we will analyze our text - and inspect the results.
- -Let's start with the analyzer we finished in Tutorial 1.
- -
Double click on the VisualText icon on your desktop.
Load the analyzer you built in Tutorial 1, this time
- by selecting File > Recent Analyzers
- and selecting
C:\apps\myanalyzerfolder\myanalyzer
- -If you want to start with the ready-made analyzer in the docs folder, - unzip the contents of:
- -C:\Program Files\TextAI\VisualText\docs\tutorial1\myAnalyzer1.zip
- -and place the myAnalyzer folder - in the working directory:
- -C:\apps\myAnalyzerFolder
- -Our first step is to create a stub. - A stub is a placeholder for a - sequence of passes that will be generated automatically. You are setting - aside an area for the automatic rule generator to create the rules for - you.
- -
In the Tab
- Window, click on the Ana Tab
- and select the tokenize
- pass. (The stub will be inserted after the pass you select
- in this step.)
Now go the Gram Tab,
- move cursor into the window and right mouse click to bring up the Gram
- Tab Popup Menu.
Select Add > Stub.
This will create a new stub in the sequence of passes after - tokenize. (You have to select the tokenize - pass in the Ana Tab to make sure the stub will be inserted in the correct - place.)
- -
In the dialog box, name the stub words.

Click OK.
The stub words has been created - in the Gram Tab.
- -When a stub is selected in the Gram - Tab, it will appear in blue. Stubs which are not selected will - appear in green.
- -
When you create analyzers, you can choose whatever name you like for - a stub. We called our stub words - because we are going to take the words - from the sentences in our eg1.txt file and use them as samples to generate - our rules.
- -Now that we have a words stub, - our next step is to create a set of rule - concepts under words. A rule concept is a concept that "owns" a set - of related samples, from which the rule generator will generalize, merge, - and generate rules.
- -The rule - concepts we will create correspond to the classic syntactic categories - of noun, verb, determiner, adjective, etc.
- -
(Make sure the words concept selected.) Right click In
- the Gram Tab, to bring up the
- Gram Tab Popup Menu.
Select Add > Rule.

In the Dialog box, add the rule names det,
- adj, noun,
- verb, prep
- like the image below:

Click OK.
Your Gram Tab should look like this:
- -
When you create analyzers, you can create any type of rule concept you - want or need. For example, if you have text that contains urls or - email addresses and you want your analyzer to recognize them, you could - create a rule concept for urls and another one for email addresses. Being - able to create rule concepts as they are needed is one of the nice features - of VisualText.
- -We only have - five rule concepts in this example. But as you begin to create analyzers, - your analyzer may require many more rules.
- -In order to organize - rule concepts, VisualText uses a special concept called a folder - concept. Folder concepts - allow you to organize collections of rule concepts.
- -Our rule concepts, - det, adj, noun, verb and prep can be classified as parts of speech. We'll - create a folder to organize our rule concepts.
- -
In
- the Gram Tab,
- click on the words
- stub to highlight it.
Right-click
- to bring up the Gram Tab Popup Menu and select Add > Folder:

Name the folder pos
- (for part of speech).

Click OK.
You - should see the following structure:
- -
Select each rule concept
- one by one and drag it into the pos
- folder. (Easiest
- to drag the bottom rule concept first, starting with prep.)
The rule concepts should be under the pos - folder (under meaning below - and indented with respect to pos) - as in the image below.
- -
Use the yellow up and down arrows on the Tab Toolbar
- to move the concepts in the pos folder so that they look like the image
- here.
You can save your work with File
- > Save Analyzer...
...and answer Yes at
- the confirmation prompt.
Also Yes to save
- the knowledge base, as the Gram Tab information resides in the knowledge
- base.
Now we are ready to start populating our concepts with samples from - eg1.txt. By "populate" we mean "fill in" or provide - each of the rule concepts with example text ("samples") of what - each rule concept is. The samples you add are called sample - concepts.
- -CAVEAT! It - is a good time to make sure your text file doesn't have any errors in - it. ONCE YOU START SAMPLING - DATA FROM A FILE, DO NOT EDIT THAT FILE. The - Gram Tab depends on the offsets of text samples in files, so that it can - use the context of the samples to build proper rules. Even - adding a blank line will invalidate the samples following it. (Adding - material to the very end of such a file, or editing so as to preserve - exactly the same number of characters, are doable if needed.) In - a "real" analyzer, we recommend putting files to be sampled - in specially designated folders and making them READ-ONLY.
- -
Once you have created eg1.txt, CLOSE
- THE FILE. VisualText
- strips linefeed characters from text files when it reads them, and this
- needs to happen before you start
- highlighting samples.
In the Text Tab, double click on the eg1.txt
- file to open it in the Workspace. Make sure everything is correct in the
- file.

First we'll add samples of nouns - to populate the noun rule concept.
- -
In the Gram Tab,
- select the noun rule concept.
- Notice that the arrow turns blue.
The first noun in our text file, is fox.
- -
Highlight
- fox
- and right click to bring up the popup menu.
Notice how the noun rule concept - has been added to the bottom of the popup menu. It appears - in the popup menu because noun - has been selected in the Gram Tab - Window.
- -
Select noun.

Look at the noun rule concept in the Gram - Tab. The - noun fox has been added - as a sample concept under - the noun rule concept. Sample concepts are indicated by the little square - icon.
- -
To add samples to the other rule concepts in the pos - folder, simply select the rule concept in the Gram - Tab and follow the same procedure.
- -There is an alternative to selecting samples by selecting individual - rule concepts in the Gram Tab. - By selecting the pos folder instead, - all of the rule concepts in the pos folder will be listed when you right - click after highlighting a word in the text.
- -
Select the pos
- folder in the Gram Tab.
Select dog in
- the text and right click to bring up the menu.
Notice that all of the rule concepts, det, - adj, noun, - verb and prep - appear in the popup menu. It may be easier for you to sample text this - way.
- -
Select noun.
Continue adding samples to the rule concepts until all
- the words in eg1.txt have been added to the appropriate rule concept.

|
- Note: Make - sure you select baby and not baby's. |
You have just created a sample hierarchy. - (This is also referred to as the Gram - hierarchy since you can view it in the Gram Tab.) The sample hierarchy - organizes our rule concept samples.
- -It is a good idea to get in the habit of saving your analyzer often. - Now in particular, since the creation of the words - stub has modified the analyzer sequence, is a good time to save the analyzer.
- -
To save the analyzer, select File
- > Save Analyzer. (And/or
- KB > Save KB, as available.)
Answer Yes at
- the confirmation prompt.
Since data has been added to the concepts in the Gram Tab, our Knowledge - Base (KB) has changed. When you save the analyzer, you are also saving - the Knowledge Base.
- -In VisualText you can control the way rules are generated. You do this - by setting certain properties for rule concepts in the Gram Tab.
- -In this tutorial, we are concerned with setting only one of the properties, - the Closed attribute. The Closed attribute specifies that automatically - generated rules will consist of a closed set of words, as collected from - the samples you, the user, provided. By setting this attribute you are - controlling the way rules get generalized.
- -(For more information about Gram concept properties, see Setting - Rule Generation Properties.)
- -
Select the words
- stub in the Gram Tab.
Right click to bring up the Gram
- Tab Popup Menu.
Choose Properties.

In the Gram Concept Properties dialog, uncheck
- the Inherited box for the
- Closed attribute.
Now place a check in the On/Off
- box.

Click Done when
- you are finished.
- -
Now let's have VisualText automatically generate some rules for us from - the sampled data.
- -If we take a look at our analyzer sequence in the Ana - Tab, you will see the following:
- -
Notice that our stub concept words - has a start, stub_words and an - end point, end_words. This is - called the stub region. We would - call this stub region the words stub - region. Remember that we created the stub region because we needed - a place for the automatically generated passes to be inserted. Once we - generate rules, the stub region will get filled in.
- -
From the Analyzer Menu, select Generate
- Rules > All.

Now look at the stub region.
- -Additional passes appear in our analyzer sequence. Each of the new passes - contains rules generated from the rule concepts we created earlier in - this tutorial. VisualText did this by taking the samples we provided in - each of the rule concepts.
- -
Notice that the Log Window has also - changed. It says Generating rules: - start then Generating rules: done. - This window is just telling you that - VisualText has started and completed the task of generating rules. If - there had been problems generating the rules, error messages would have - been displayed here.
- -Let's take a - look at the rules VisualText created.
- -
Select the noun
- pass.
The link in front of 5 noun - turns blue and the text gets a grey box indicating that it is selected.
- -
Double click on the noun
- pass to open the pass file.
The noun pass file, automatically generated from the samples you added - to the Gram Tab, is displayed in the Workspace. This pass file (also called - rule file since it contains rules) - is stored in the spec folder of the myAnalyzer directory. The name of - the pass file is noun.pat. You'll - learn more about pass file names in Tutorial 3.
- -
The form of the pass file is discussed in a later tutorial, too. But - generally what the above rule "says" is that every time the - analyzer runs across one of the words listed in parentheses (e.g. "dog", - "John", etc.), these words should be classified as "noun". - In Tutorial 3, you'll see how this automatically-generated rule can be - helpful.
- -Now that we have some extra passes in our analyzer sequence, let's run - the analyzer to see how our parse tree changes.
- -
Double click eg1.txt
- in the Text Tab to bring the file
- to the front of the Workspace.
|
- Note: This - step is optional if eg1.txt appears in the current text panel within the - Tab Toolbar. This will let you know what text will be analyzed. |
Start the analyzer by either clicking on the Run button
or by
- selecting Analyzer > Run
- from the Main Menu.

Now that we have run the analyzer, let's view the resulting parse tree.
- -
Click on the View Parse
- Tree button.
or select
- the
- eg1.txt in the Workspace, right
- mouse click, and select View > Parse
- Tree from the
- Text File Popup Menu.
Your parse tree should look like this:
- -
|
- Note: - If you ran the analyzer with Generate Logs on, the title bar in your parse - tree may not match the image. The - title bar will show the name of the selected pass in the Ana Tab. |
You can expand nodes labeled with a + by selecting them.
- Note that node labels (_noun,
- _adj, etc.) have been added to
- most lexical items in the file. All non-terminal node labels start
- with an underscore ('_'). 'fired' indicates that a rule matched and 'blt'
- indicates that a node was built.
Close the open files in the Workspace by selecting the
- X in the upper right-hand corner
- of the file.
Exit the analyzer.
- -
From the Main
- Menu, select File > Exit.
Answer Yes at
- the confirmation prompt for both
- saving the analyzer and the knowledge base.
In this tutorial, we added sample data to
- VisualText in order to generate rules automatically. We created
- a stub concept named words, some rule concepts for the classical syntactic
- categories, and a folder concept to organize the rule concepts. We sampled text data for these
- concepts and generated
- rules. Finally, we ran
- the analyzer against a text file and inspected the resulting parse tree. Adding samples
- and automatically generating rules demonstrate a simple way to maintain
- and enhance text analyzers with VisualText. In Tutorial 3, we'll
- show you how to create simple hand-built rules to parse the sentences
- in the text we worked with in tutorials 1 and 2.
-
-
-
-
-
-
-
-
In Tutorial 2, we saw how to automatically generate rules by highlighting - samples in our text files. In this tutorial, we will use the other method - of generating rules, and that is to build them by hand. An in-depth text - analyzer will typically include rules made by both of these methods.
- -In the last tutorial, we looked at the noun pass file that was automatically - generated by VisualText™. In this tutorial, we will work with pass files - like this one but this time we will write the rules ourselves. In particular, - we will write rules for finding noun phrases (NP), verb phrases (VP), - prepositional phrases (PP), and possessive phrases (POSS).
- -We'll use the analyzer built in Tutorial 2.
- -
Launch VisualText.
From the Main Menu,
- select File > Recent Analyzers
- and choose:
C:\apps\myAnalyzerFolder\myAnalyzer
- -If you want to start with the ready-made analyzer in the docs folder, - unzip the contents of:
- -C:\Program Files\TextAI\VisualText\docs\tutorial2\myAnalyzer2.zip
- -and place the myAnalyzer folder - in the working directory:
- -C:\apps\myAnalyzerFolder
- -Each 'bead' on the analyzer sequence is a pass. For the typical rule-based - pass, the analyzer engine traverses the input text (actually, the parse - tree representing the text) once before proceeding to the next pass.
- -
Click on the Ana Tab
- and take a look at the pass sequence.
Our analyzer right now has eight passes, namely tokenize, - the automatically generated passes det, - adj, noun, - verb and prep, - and the two stub region markers.
- -Now we'll add a new pass following the words - stub region. In this case, we want to add our next pass to the end of - the current analyzer sequence.
- -
Select the end-of-stub marker end_words
- and right-click to display the Ana
- Tab Popup Menu.
Select Add > New
- Pass.

In the Pass Properties
- dialog, name the pass NP (for
- 'noun phrase').

Leave Type:
- as the default value, Pattern. (This is the pat
- pass algorithm type mentioned previously.) Leave the Set Active Flag information
- as is. (The Set Active Flag box is used to activate or inactivate a pass
- in the analyzer sequence.)
Click OK.
VisualText creates a new pass in the analyzer sequence after end_words, - named NP.
- -
Now, double click the NP
- pass to open it in the Workspace.
We are now ready to start hand building some rules in our pass file.
- -- -
VisualText creates a pass file with some default structure to get you - started. This is just a starter template and it can be edited to create - the code and rules you need.
- -
Now is a good time to review some definitions and learn a little more - about building rules.
- -A pass - is one step in the analyzer sequence. It corresponds to one 'bead' in - the Ana Tab. There are several - types of passes. The most prevalent type of pass is called pat (for 'pattern'), or a rule-based - pass. Each pat pass has an associated pass - file (also called a rule file). - The pass file that corresponds - to the noun pass for example, is called noun.pat. - When you hand-build rules, you are writing NLP++™ (code and rules) within - the pass file itself. For a detailed description of the pass file syntax, - see About - Pass Files in the NLP++ section of this Help. Later - tutorials will also go into more detail.
- -Let's take a closer look at our default NP pass file.
- -Anything to the right of the pound sign, - #, is a comment and is not part of - the actual rule. The file header uses pound-sign comments to name and - describe the current pass.
- -The actual rule file begins at the @CODE - marker. This - is the beginning of a region called the CODE Region. The - CODE Region optionally ends with an @@CODE marker. Code placed here executes - prior to any rule matching in the current pass. A pass may consist entirely - of code written within the CODE Region. In these tutorials, we won't be - editing the CODE Region.
- -The @NODES marker tells the analyzer which - nodes to apply the subsequent rules to. The line
- -@NODES _ROOT
- -means that the rules will be applied only to nodes 'dominated by' the - non-terminal node _ROOT. - Recall from Tutorial 1 that the nodes dominated by _ROOT - include all of the words and characters in the eg1.txt file. You can see - the list of nodes that will be traversed by rules of this file by viewing - the parse tree for eg1.txt. This is what our parse tree looked like at - the end of Tutorial 1.
- -
Next is the @RULES marker, which tells the - analyzer to expect a new RULES Region. - The RULES Region is where you write your rules. If - the @RULES marker is not preceded by an action - region (e.g., POST), - then it implicitly tells the analyzer to use a default action for the - rules of this region.
- -
A rule has the form 'X <-- Y Z ... @@', which means: 'nodes that - match the phrase Y Z ... - will get a new dominating node named X.' In the default rule, _xNIL is the suggested element and _xNIL (on the right hand side) is a phrase of - only one element. _xNIL - is a special rule element that - represents the empty token, or 'nothing', by convention. Another special - token, _xALPHA, matches any alphabetic token - in the parse tree.
- -The @@ symbol - marks the end of a rule.
- -
Hand-edit the @RULES Region
- of the NP pass file as below:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@RULES
- -_NP <-
- -_det
- -_xWHITE
- -_adj
- -_xWHITE
- -_adj
- -_xWHITE
- -_noun
- -@@
- - -|
- Note: You can copy and paste from the Help - documentation into your analyzer. However, - note that formatting and colors may be lost when you paste the copied - text into the analyzer pass file. Saving - the file after you have copied the text, closing the pass file and then - opening the pass file again can restore some of the formatting. |
Make sure you use a lowercase x - when writing _xWHITE in your rules.
- -
Save the NP pass
- file. (Though running the analyzer will automatically save the pass file,
- it is a good idea to get into the habit of saving edited pass and text
- files often.)
The rule we've added says that a phrase consisting of a determiner followed - by two adjectives followed by a noun, with intervening blank spaces, will - suggest or reduce - to a noun phrase (NP). Such a match is searched for in the nodes directly - under the _ROOT node.
- -The initial underscore character "_" is an NLP++ convention - marking nonterminal or internal - nodes, as opposed to terminal - (also called literal or leaf) nodes, which represent words, - numbers, and punctuation.
- -You have just written a rule in VisualText standard rule format, - in which each element is on its own line. The Pass File Popup menu, - which provides handy tools for editing rules, assumes that rules are in - standard format. See Standard - Rule Format for more information.
- -We have now finished creating our first hand-built pass file.
- -Now we are ready to run the analyzer again to see what kind of parse
- tree we get after the addition of our NP pass file. For this tutorial
- deselect the toggles for Generate Logs
, Verbose Mode
, and Page Mode
.
To run the analyzer sequence on the text,
- -
Select
- eg1.txt in the Text
- Tab and click the Run
- button. ![]()
When the analyzer is run, a report is generated in the Log - Window. The left side of the report will contain the name of the - analyzed file and the right side of the report will show the passes and - the total time needed to process the pass.
- -Now we can look at the resulting parse tree as we did in Tutorials 1 - and 2.
- -
Select eg1.txt
- in the Workspace, right click and select View
- > Parse Tree. Don't forget that you can also use the View
- Parse Tree button. ![]()
Notice how the new parse tree has inserted the node _NP - under _ROOT.
- -
Expand the first _NP
- node. It contains the nodes _det _adj
- _adj _noun corresponding to The quick brown and fox:

When the analyzer encountered the determiner ("the"), followed - by two adjectives ("quick", "brown") and a noun ("fox"), - the rule within the NP pass file was matched. The default reduce action - was executed, yielding the NP subtree whose root is highlighted above. - The same reduce action was executed to create the noun phrase 'the lazy - yellow dog.'
- -
Close the parse tree display.
- -
Not all noun phrases have two adjectives like 'quick' and 'brown' in - the phrase 'the quick brown fox'. Some noun phrases may have only one - adjective, such as 'the quick fox' and some may not have any adjectives - at all, as in the noun phrase 'the fox'. We can modify the NP pass file - so that we can catch these types of cases, too.
- -
Modify the NP
- pass file to add the three new rules to the RULES
- Region as follows:
@CODE
- -G("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@RULES
- -_NP <-
- -_det
- -_xWHITE
- -_adj
- -_xWHITE
- -_adj
- -_xWHITE
- -_noun
- -@@
- -_NP <- _det _xWHITE - _adj _xWHITE _noun - @@
- -_NP <- _det _xWHITE - _noun @@
- -_NP <- _noun @@
- -This demonstrates multiple rules in a single pass.
- -There are four rules, all operating in the same context node _ROOT. - (We could have written the first rule, which now occupies 9 lines, on - a single line like the other rules in the file.) We have now expanded - the NP rules so that it can "catch" noun phrases that have one, - two or no adjectives contained in it.
- -
Run the analyzer again. ![]()
Click on the View
- Parse Tree button to see the new parse tree. ![]()
Notice how the new parse tree has inserted the _NP - for 'the book'.
- -
The ordering of rules within a pass file, as well as the ordering of - passes in an analyzer sequence, can create, hide or destroy parse tree - structure available for later rules and passes. The analyzer engine attempts - to match rules as they are presented in a pass file. That is, it starts - from the first rule written in the file and goes down the list of rules. - Therefore, the longest rule expansion in the example above is tried first. - If we had ordered the rules with the shortest expansion (_NP - <- _noun) first, the noun 'Fox' - would get an _NP node label, hiding - the 'structural description' (the right hand side of the rule) for application - of the longer expansion rules. In other words, we would short-circuit - the rules.
- -When a pass creates a structural description used by later passes, it - is said to be 'feeding.' When it removes the structure, it is said to - be 'bleeding.' A large part of developing a text analyzer is figuring - out the right bleedings and feedings.
- -
Close the parse tree display.
Now we will write a rule to handle possessives, as in baby's.
- -Use the procedure you just used to create the NP pass to create a new - pass:
- -
Select the Ana Tab.
- Left click on end_words in the
- pass sequence then right-click to pull up the popup menu. (This will add
- a new pass BEFORE the NP pass).
Select Add > New
- Pass.
Name the pass POSS
- (for 'possessive') and leave Type:
- Pattern.
Click OK.
Your Ana Tab should look like this:
- -
Double-click on the POSS
- pass to open it in the Workspace and edit the
- RULES Region so that it looks like
- this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@RULES
- -_adj <- _noun \' - s @@
- - -|
- Note: - There isn't a space after the backslash in the rule. |
The use of the backslash \ here is to 'escape' the apostrophe. - Other escaped characters include all the punctuation characters as well - as space, tab ('\t'), and newline ('\n'). (To display blank spaces visibly - in the parse tree, VisualText uses '\_', but this is just an artifact.)
- -
Save the POSS
- pass file.
Now, let's run the analyzer.
- -
Select the text file and click the Run
- button. ![]()
Right-click on eg1.txt
- in the Workspace and select View >
- Parse Tree to view the
- parse tree for eg1.txt.
Scroll down to the
- phrase 'the little baby's cheek' to check the parse tree. Expand the parse
- tree. It should look like this:

Close the parse tree display.
Now let's add a PP (prepositional phrase), VP (verb phrase), and Sentence - (sentence) pass to the analyzer sequence. For these passes, go ahead and - add them one at a time to the end of the sequence. (Unlike the POSS rule - added above, where you inserted the POSS pass before the NP pass, the - passes below should be added one after the other at the end of the analyzer - sequence.)
- -Here is a procedure to add these passes:
- -
To create a pass in the Ana Tab:
Select the last pass in the analyzer sequence.
Right click and select Add - > New Pass.
Add the name - of the pass, PP, in the Pass Properties. Leave Type as Pattern. Click OK.
To modify the pass file double click - on the pass in the sequence to open it in the Workspace and modify the - rules accordingly. Make sure to save your file after editing it.
- -Your prepositional phrase pass file (PP) - should look like this:
- -@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@RULES
- -_PP <- _prep _xWHITE - _NP @@
- -And the verb phrase pass file (VP) should look like this:
- -@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@RULES
- -_VP <- _verb _xWHITE - _NP _xWHITE _PP - @@
- -_VP <- _verb _xWHITE - _PP _xWHITE _NP - @@
- -_VP <- _verb _xWHITE - _NP @@
- -_VP <- _verb _xWHITE - _PP @@
- -_VP <- _verb @@
- -Finally, the sentence pass file named Sentence - should look like this:
- -@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@RULES
- -_S <- _NP _xWHITE - _VP @@
- -Take a moment to go through and "read" each of the pass files. - Each file specifies what nodes should be analyzed (in this case the nodes - under _ROOT) and further what - should be done (specified in RULES Region) - when a match is found.
- -The resulting analyzer sequence should look like this:
- -
If your analyzer sequence does not match this sequence, use the yellow - arrows on the Tab Toolbar to move the pass to the correct location in - the analyzer sequence.
- -We are now finished hand-building our rules. By using these rules, our - analyzer will be able to find not only noun phrases, verb phrases, prepositional - phrases but even sentences.
- -Now, let's run the analyzer with the new pass sequence on eg1.txt. This - time before we run the analyzer we will use the Generate - Logs button. Turning the Generate Logs button on will allow us - to view the cumulative parse tree - for each pass in the sequence, called the intermediate - parse tree. You'll see how this works in a moment.
- -
Select the Generate
- Logs button. ![]()
Click the Run button. ![]()
Let's take a look at the parse tree for the Sentence pass.
- -
Select the Sentence
- pass in the analyzer sequence.
Click the View Parse
- Tree button. ![]()
The Parse Tree should look like this (NOTE: - The lines pass is obsolete):
- -
The rule in our Sentence pass file says, if you find - a node with the label _NP followed - by a _VP, rename the node _S. As you can see, the analyzer was - able to identify our three sentences.
- -Note that the name of the pass, Sentence, is - shown at the top of the tree display window. Also notice the number 13 - before Sentence. This let's you - know that you are looking at the intermediate parse tree for the 13th - pass (Sentence) in the analyzer - sequence.
- - -|
- Note: - If you don't see the parse tree for each of the passes, make sure the - Toggle Generate Logs button is selected before you run the analyzer. If - you run the analyzer with the logs turned off, you will see a zero in - the title bar of the parse tree. |
- -
If you select another pass in the analyzer sequence,
- like VP, and then View
- Parse Tree button, you
- should see the following:

Notice that the parse tree window is labeled VP, - and that it displays the result of - applying the rules in the VP pass file.
- -The pass you select in the analyzer sequence determines which intermediate - parse tree is displayed. Being able to easily inspect the intermediate - parses is useful when you're trying to create and debug your analyzer.
- -
Close the open files in your Workspace. (You
- can use Window > Close All
- from the main menu.)
Exit the analyzer. From the Main Menu, select File
- > Exit. (If
- asked to save the analyzer, click Yes).
Save a copy of
- c:\apps\myAnalyzerFolder\myAnalyzer as myAnalyzer3. You
- will need this in order to run Tutorial 6 later on.
In this third tutorial, we created new passes
- for the analyzer sequence by hand, edited the default settings, ran the
- modified analyzer, and viewed the resulting parse trees. We then
- created additional rules, one of them requiring an escape character \
- for handling apostrophes. We then used
- the Toggle Generate Logs button, ran the analyzer, and viewed
- the intermediate parse trees.
-
-
-
-
-
-
-
-
-
-
-
In this tutorial we create and read input files, add more rule concepts - and associate concepts with the input files. We extract text from specific - parts of the parse tree and write such information to an output file. - We also take a closer look at rule syntax. Finally, we introduce some - navigation shortcuts and a useful debugging tool in VisualText®.
- -We'll start with the analyzer from Tutorial 3.
- -
Launch VisualText.
From the Main Menu, select File
- > Recent Analyzers and then select c:\apps\myanalyzerfolder\myanalyzer.
If you want to start with the ready-made analyzer in the docs folder, - unzip the contents of:
- -C:\Program Files\TextAI\VisualText\docs\tutorial3\myAnalyzer.zip
- -and place the myAnalyzer folder - in the working directory:
- -C:\apps\myAnalyzerFolder
- -In Tutorial 2, you learned how to sample words in a file in order to - generate rules. You took each word individually and manually placed it - in the appropriate concept, noun, verb, adjective, etc.
- -Sometimes it is more convenient to add sample data to the rule generation - component of VisualText by importing a text file with data that is already - of a certain type. For example, suppose you had a list of company names - that you wanted to train an analyzer to recognize. To do this, you need - to tell the system where the input file is and then give it a label.
- -To keep things organized, we'll store files containing our lists to - be sampled in a new folder called dictionary.
- -
Create a folder in the Text
- Tab by right-clicking in the window and selecting Add
- > Top Level > Folder:

Name the folder dictionary
- and click OK.
This is where we'll store the file containing our company names.
- -Your Text Tab should look like - this:
- -
.
Since we don't have a text file of company names created yet, we will - have to generate one now.
- -
In the Text Tab,
- select the new folder you just created,
- dictionary.
Right click to bring up the popup menu, and select Add > New Text File.
Name
- the new file companies and click OK.
A - blank text file with the titlebar 'companies.txt - (dictionary)' will pop up in - your workspace. "dictionary" appears in the titlebar of the - file to indicate that your text file, companies - is part of the dictionary folder.
- -
Enter the following company names into your file:
Lambsoft
- -Fencetech
- -IBM
- -Cisco
- -GM
- -GE
- -
Save the file by right-clicking on companies.txt
- and selecting Save from the menu.
Close and double-click
- on the file to open it. (VisualText
- converts carriage return plus line feed to carriage return, which will
- affect the offsets and automated rule generation, so this step needs to
- be done for each new or saved file.)
The - file companies.txt is now contained in the dictionary - directory. (If you don't see it in the Text - Tab, choose Refresh from - the Text Tab Popup Menu)
- -
Rather than creating and typing in the contents of the file in VisualText, - we could also have copied an existing file from some other source directly - into the dictionary folder:
- -C:\apps\myAnalyzerFolder\myAnalyzer\input\dictionary
- -Now that we have this data saved in our dictionary folder, we're going - to create a new rule concept and read the data into the concept from this - new file. We'll follow the same procedure we used in Tutorial 2 when we - created the rule concepts for det, adj, noun etc. This time however, we - will populate the concepts with the data contained in the companies.txt - you just created.
- -
In the Gram Tab, select the pos
- folder. (Make sure the pos folder
- opens up.)
Right click, and select Add
- > Rule:

Type in the concept name companies
- and click OK.
The new rule concept is added to the pos - folder. (If the rule concepts in your pos folder are expanded, scroll - down to see the newly added rule concept, companies.)
- -Your Gram Tab should look like - this:
- -
Now we are ready to import the content of our companies.txt - file into our new concept companies.
- -
In the Gram Tab, select companies,
- then right click and select Sample File > Import from the menu.

VisualText will warn you that importing samples will delete whatever - sample data you have in the concept rule.
- -
Since we don't have any sample data that can be deleted, we don't have - anything to worry about.
- -
Click Yes to the warning popup.
The Open dialog box will take us to the analyzer input directory.
- -
Open the dictionary
- directory and select the companies.txt
- file.

Click Open.
The samples in companies.txt - have been added to our new concept.
- -
While we built the companies.txt - file by hand, any list of phrases can be used in this manner, as long - as there is one phrase per line in the text file. Although we named the - concept companies and the input - text file companies.txt, this - name matchup is not required.
- -Now we are ready to have VisualText generate our new rule.
- -
From the Main Menu, select Analyzer
- > Generate Rules > All.

Click on the Ana Tab
- and look at the analyzer sequence. A new 'bead' or link has been added
- to our analyzer sequence as the last item in the words
- stub region. The pass companies
- has been added.

Now let's take a look at the rule in our new pass file.
- -
Double-click on the companies
- pass to display the automatically generated rule:

Since companies was the last - "child" concept of pos - in the Gram Hierarchy, its pass - becomes the last pass in the words - stub.
- -If you didn't make companies - the last child concept when you created it, you can move it around in - the Gram Tab using the yellow - arrows. If you do move the pass around however, remember that you'll need - to regenerate the rules in order to update the analyzer sequence. (From - the Main Menu, select Analyzer > Generate - Rules > All).
- - -|
- Note: - The order of generated passes should not be changed via the Ana Tab. |
- -
Let's take a closer look at the structure of the companies - pass file.
- -First, look at the first line that has been commented out. It reads: - AUTOMATICALLY GENERATED! EDITS WILL BE LOST!. - This warning is letting you know that any edits you make to an automatically - generated pass will not 'stick' the next time you try to automatically - generate the rule. For example, you can't edit your companies - pass file and then try to automatically regenerate the file. Your - edits will be lost. The only - way to modify the automatically generated files is to add or edit samples in the Gram Tab and regenerate the - passes. You can, of course, copy the contents of a pass into a hand-built - pass (outside of a stub region) -- this is a way to have VisualText build - rules for you. Our other type of pass, the hand-built type, can always - be hand-edited.
- -The next line in the comment section of the pass file, tells you where - the .pat file 'resides':
- -c:\apps\myAnalyzerFolder\myAnalyzer\spec - is the directory, and the file name is companies.pat. - All pass (.pat) files reside in the spec directory.
- -The last line in the comment section of our automatically generated - pass file contains a timestamp indicating when the pass file was created.
- -Now let's take a look at the rest our pass file.
- -Again, @NODES _ROOT means that the rules in - the pass file are applied to the list of nodes directly dominated by a - node named _ROOT.
- -The line starting with the @PRE - marker indicates a region of constraints (or PRE Actions) that parts of - a rule (or rule elements) must satisfy in order to match. In this case, - the condition requires that the first element of each subsequent rule - match a capitalized word. Here you can see how VisualText performed some - rule generalization. It looked at all the samples and deduced a - pattern in the text, that is, that all the words in the samples started - with capital letters and added this condition to the rule file.
- -The <1,1> syntax means that the PRE action applies from element - 1 through element 1 of the phrase on the rule's right hand side. - The first element of our rule is _xWILD. The - condition placed on this rule, is that whatever _xWILD - turns out to be, it must be a capitalized word. If we had <1,2> - instead of <1,1> then both the first and second elements in the - rule's phrase would need to be capitalized, and so on.
- -The region marker @RULES - indicates where rules occur. We've introduced the basic syntax of a rule - earlier in this set of tutorials.
- -Now, let's take a look at the rest of our pass file.
- -The 'variable' _xWILD - is a wildcard match and matches anything within the constraints placed - on it. In this case, the conditions of the wildcard match are given - following the wildcard in square brackets [ ]. The conditions min=1 - max =1 mean that _xWILD must match a minimum of one node - and a maximum of one node. If max = 2, then the rule will match - one or two nodes of the parse tree. (max=0 means an unconstrained maximum. - min=0 means that the wildcard can optionally match zero elements.)
- -The s - modifier stands for singlet. It tells the rule matching engine to - search a node's descendants for a match, but stop looking 'down' in the - tree when a node has more than one child (i.e., it branches into more - than one node) or when a node has its BASE attribute set. Singlet - and base allow syntactic and semantic features to be layered into the - parse tree. If - a series of passes had applied that only operated on single elements, - building up a 'stack' of node labels for that element, this rule could - still match against a lower node in the stack of labels. In brief, the - singlet mechanism allows attributes to be placed and matched directly - within the parse tree. The subtree of attribute nodes is called a singlet chain.
- -The final section of the conditions is the match list of tokens that - _xWILD must match, corresponding to the items - in the input sample file.
- -Now, let's create some text that exercises the new companies - pass. First, - let's create a new folder in the Text - Tab to hold our example file. Again, folders are used to help you - organize your text files.
- -
In the Text
- Tab window, right click and select Add
- > Top Level > Folder:
Name the
- folder examples.
Select the examples
- folder.
To create a new file,
- right click and select Add > New Text File.
Name the file eg2
- (again omitting the .txt extension).
Notice that the folder name - "examples" is part of the titlebar of the eg2.txt file.
- -
Now, type the following text in the body of the text
- file:
Lambsoft jumped over Fencetech.
-Cisco gave GE the yellow book.
Close and open the file to make sure VisualText converts it.
Now let's run the analyzer on eg2.txt.
- -Since the eg2.txt file is already selected in the Text Tab:
- -
Click the Run button.
View the parse tree, by right clicking on eg2.txt in the Workspace, and selecting View > Parse Tree.

At first glance, it may look like our Sentence pass is not working here, - since we don't have any _S nodes. - (Remember that the rule in our Sentence pass says, if you find a NP followed - by a whitespace and then a VP, reduce them to the new node _S.) - In fact, the Sentence pass is working fine. It is just that the rules - in the Sentence pass file require a noun phrase before a verb phrase and - since the names in companies file are reduced to _companies - and not _noun, the conditions - set in the Sentence pass are not - met. We'll have to go in and create a new concept to get this done.
- -Now let's create a new pass in our analyzer sequence that will rename - a _companies node to be a _noun node. (Developer's - note: another way, not shown here, uses the Properties dialog in - the Gram Tab to add the layered label _noun when automatically generating - the rules for _companies.)
- -
In the Ana Tab,
- select end_words. We want our
- pass to be inserted before the
- POSS pass.
Right click and select Add
- > New Pass.
Name
- the new pass company2noun.
Leave Type as Pattern.
Double-click the newly created company2noun
- pass, and edit the RULES Region so that it looks like the following:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@RULES
- -_noun <- _companies [s] - @@
- -Now that we have this pass in our analyzer sequence, company names can - be treated as regular nouns.
- -
Run the analyzer on eg2.txt.
- ![]()
Now, let's take a look at the new parse tree.
- -
(Select the Sentence
- pass in the Ana Tab if the Generate
- Logs toggle is on.)
Select eg2.txt in
- the workspace, right click and select View
- > Parse Tree. Expand the first _S
- and look at the parse tree.

That worked pretty well, except notice that in the second sentence, - the second noun phrase wasn't included. Instead of the sentence, 'Cisco - gave GE the yellow book.', our analyzer parsed 'Cisco gave GE' as a complete - sentence. The structure of the sentence, 'Cisco gave GE the yellow - book.' is a noun phrase (Cisco) followed by a verb phrase (gave) followed - by two noun phrases, 'Cisco' and 'the yellow book.' It appears as if our - VP pass file does not account for "verb + NP + NP".
- -Let's take a look at the VP - pass file.
- -
Double click on the VP
- pass in the analyzer sequence.
- Notice that our rules do not cover this case.

Let's edit the VP pass file to allow a verb phrase to be formed from - a "verb + NP + NP".
- -
Add the following rule as the first rule in the RULES Region:
_VP <- _verb _xWHITE _NP _xWHITE _NP @@
- -
Run the analyzer again on eg2.txt
- with the Generate Logs
- button on.
Select eg2.txt
- and view the parse tree.
The parse tree should look like this:
- -
(Select the Sentence pass in - the Ana Tab to see the parse tree.)
- -One of the helpful features of VisualText, is the ability to extract - specific parts of the parse tree and write the extracted information out - to a file. Up until now, we have viewed our results using the parse tree. - Now we will learn how to direct the results to an output file. We can - do this by adding a POST Region to the relevant pass file.
- -
Double click on the company2noun
- pass in the Ana Tab to
- open up the pass file.
Add the POST Region to the file so that it looks like
- this:
@CODE
- -G("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@POST
- -"output.txt" - << "Found company: " - << N("$text") << "\n";
- -single();
- -- -
@RULES
- -_noun <- _companies [s] - @@
- -You are already familiar with the NODES - and RULES part of the rule file. @POST is the marker - for the POST Region. This - region contains code (the two lines between @POST - and @RULES) that will be executed if a rule - in the subsequent RULES Region matches.
- -Let's take a closer look at the code in the POST Region.
- -If you are familiar with C++ programming, you'll notice that the code - to write to an output file is similar.
- -The first line of code can be broken down into two parts: what is to - the left of the output operator (<<) and what is to the right of - the operator. The left side of the operator specifies the name of the - output file, in this case 'output.txt', and the right side specifies what - should be written to the output file and how. We'll go over the code in - more detail below.
- -The first item to the right of the output operator is "Found company: - ". This basically says, print the text "Found company: " - in the output file. Material enclosed in double quotes is printed literally.
- -The next thing that gets printed to the output.txt is indicated by N("$text"). - This means 'get the text in the last node element' (i.e., the text contained - in _companies) and append it to - the output file. (If there were more than one element in the right - hand side of the rule, you could specify which element to extract the - text from with a second argument to N, for example, the second element's text - could be extracted with the expression N("$text",2).)
- -Our last item, is "\n". This adds a newline.
- -The last item on our first line of code is the semicolon, analogous - to the statement terminator of other programming languages.
- -The second line, single();, - instructs the rule engine to perform a single-tier, or default, reduction. - This is described below.
- -(Advanced section. Primarily for the - programmer or computational linguist.)
- -A reduction rule is one which takes one or more elements, such as the - sequence _NP _VP, and reduces - the matched phrase of nodes to one node, such as _S. - For historical reasons, the default reduce action is called a single-tier - reduction. The default reduction can be superseded in the - POST Region. That is, the rule - _S <- _NP - _VP will perform a single(); - reduction by default. If you do write a non-empty POST Region, however, - you must specify the type of reduction you want, else the default is noop. - noop - is an action that does nothing (i.e., "no op" or "no operation"). - Two other reduction types include group and excise.
- -group - is used when you have a structural description such as 'A B C D' but you - only want to create a node from B and C, leaving A and D alone. A pass - such as
- -@POST
-group(2,3,"_foobar");
-@RULES
-_xNIL <- A B C D @@
creates a structure like A _foobar(B C) D.
- -excise - deletes structure from the parse tree, and noop - causes no reduction to be performed. For a summary of the different types - of Post Actions available, see POST - Actions. For now, we need to include the default reduction type for - the purposes of the current example.
- - -|
- Note: - Omitting single();in - the POST Region is a common error. |
Now that we have edited our company2nouns - pass file to print information to an output file, we are ready to run - the analyzer.
- -
Click on the Run
- button. (You can also run the analyzer by right clicking on eg2.txt
- in the Workspace and selecting, Run.)
There are a couple of methods to view output files. The easiest is:
- -
Select the View Output
- File button
located on the Debug
- Toolbar.
The output.txt file will open up in the Workspace. The result looks - like this:
- -
The output file output.txt is - written to a system-created directory. The path to the file is:
- -C:\apps\myAnalyzerFolder\myAnalyzer\input\examples\eg2.txt_log\output.txt
- -Another way to view the output file is from the Text - Tab Window.
- -
In the Text Tab, open the
- examples folder. Expand
- eg2.txt.
Double click on the output.txt
- file.

|
- Note: - The ana~.log files here let you know the analyzer was run with the Generate - Logs button on. |
Notice that the output file is placed into directories created by the - system corresponding to the input file name. You can see this in - the titlebar of the output file. This makes working with multiple input - files convenient. (The other files in the folder are the intermediate - log files.)
- -Note that the main output file, named output.txt - by default, is special and is bound to the View Output File button. If - you had named the output file something like foo.txt, - with a print statement like
- -"foo.txt" << "found companies : " << N("$text") << "\n";
- -then the View Output File button would not display the file foo.txt.
- -To view such an output file, use the View
- Dump Files button. ![]()
This will list all the files with a .txt extension in the current log folder, - or default output folder associated with an input file. If you - were to have two output files created by:
- -"foo.txt" << "found companies : " << N("$text") << "\n";
-"foo2.txt" << "found companies : " << N("$text") << "\n";
then you could use the View Dump Files - pulldown list to choose - between them:
- -
There are many shortcuts in VisualText to help you navigate among files. - One of these navigation shortcuts uses the Previous - Text and Next Text buttons - on the Debug Toolbar.
- -![]()
For example, if you want to run the analyzer on the next file in the - currently selected folder in the Text Tab, you can use these buttons to - quickly get the file.
- -
First close all the open files in the Workspace. (You
- can use Window > Close All
- in the main menu).
Create another file in the examples
- folder. (Double click to open the examples folder, right click and select,
- Add > New Text File.)
Name the file eg3.txt. In the eg3.txt file, add the following
- text:
John kissed the dog.
-Mary gave the book to John.
Save eg3.txt.
Select the Page Mode
- Toggle button
in order to enable the Next
- Text and Previous Text
- buttons.
Notice how the two horizontal arrows to the right on the toolbar are - enabled:
- -Next Text
- -
Previous Text
- -
Click on the Previous
- Text button. Notice eg2.txt
- is yellow in the Text Tab, and
- that eg2.txt is the name of the
- file displayed in the workspace.

Now click on the Next
- Text button. Notice
- that eg3.txt in the Text
- Tab is now selected (it turned yellow), and the file displayed
- in the Workspace is eg3.txt.

Clicking the Previous
- Text button operates the selection display in reverse.
Another one of VisualText's many shortcuts is a debugging tool used - to highlight concepts.
- -The Toggle Highlight Mode button
-
highlights regions of text in an analyzed file that match
- rules in a selected pass of the analyzer. This tool lets you quickly see
- whether and where a pass has a rule that has applied.
An alternative to using Toggle Highlight - Mode, is to inspect the parse tree, but this can be a slower process - (although it gives you more information). To use this highlighting feature, - you must have the Toggle Generate Logs - button selected. (Information on the Toggle Generate Logs button is given - below.)
- -Let's see how the Toggle Highlight - Mode works.
- -
Select the Toggle Generate
- Logs button.
(Toggle
- Generate Logs is next to Toggle
- Highlight Mode on the toolbar.)
Double click on the eg1.txt
- to open it in the Workspace.
Run the analyzer on eg1.txt.
- ![]()
Select the det
- pass in the Ana Tab, then click
- on the Toggle Highlight Mode button
-
:

Notice how the text matching the det - pass turns blue.
- -
Now select a later pass in the analyzer sequence, for
- example the noun pass. Notice
- how the text changes to now match the noun
- pass file.
If you prefer using pulldown menus, the same function can be accessed - by selecting Highlight Matches from either the Gram Tab or the Ana Tab - popup menus.
- -
Close the open files in the Workspace.
(If available) save your analyzer. (File
- > Save Analyzer.)
(If available) answer Yes
- at the confirmation prompt. And
- the same for saving the knowledge base.
Exit the analyzer. From the Main Menu, select File
- > Exit.
In this tutorial we created an input file - to store lists of items in a concept, created a new top concept for the - item and imported the file's samples into the concept. We - generated the rules and ran the analyzer against the input data. - We discussed some features of the automatically generated rules, then - created another hand-built rule to utilize the automatically generated - rules in the analyzer logic. Finally, we printed some data to an - output file and explored some navigation and debug tools.
- - - - diff --git a/Help/helps/Tutorials/tutorial5/tutorial5.html b/Help/helps/Tutorials/tutorial5/tutorial5.html deleted file mode 100644 index cdd4f26..0000000 --- a/Help/helps/Tutorials/tutorial5/tutorial5.html +++ /dev/null @@ -1,2476 +0,0 @@ - - - - - - - - - - -In the last several tutorials, you have learned how to create pass files - in VisualText™. The pass files you have seen so far contain NLP++™ code - and rules.
- -NOTE: This tutorial does not discuss NLP++ user-defined functions and - local variables (L). - The user - can find these in the Help sections dealing with NLP++.
- -NLP stands for Natural Language Processing. NLP++ is a general purpose - programming language combined with a grammar. Text Analysis International's - NLP++ allows you to concentrate on the conceptual aspects of building - a text analyzer. In other words, it simplifies the programming task involved - in building the analyzer.
- -NLP++ is tightly bound to the parse tree used in VisualText-style text - analyzers, and also to the Conceptual Grammar™ knowledge base management - system, or KBMS. Conceptual Grammar is a knowledge representation framework - consisting of concepts, attributes and phrases, combined into knowledge - hierarchies and graphs. The hierarchy of samples in the Gram Tab is implemented - as a hierarchy within the Conceptual Grammar KBMS.
- -A key feature of NLP++ is the ability to access and augment parse tree - information dynamically during text analysis. That is, it creates and - uses information during the text analysis process itself. NLP++ uses a - special syntax for variables that simplifies the manipulation of information - in parse trees. In this tutorial, we introduce five special variable types - and show how they can help us with two classic linguistic parsing problems - common to text analysis: extracting the head noun in a noun phrase, and - determining the subject and object of a sentence.
- -We'll briefly introduce the five special types of NLP++ variables here. - We'll go into more detail later on as we start to edit our rule files. - (For more information on variables see About - NLP++ Variables.)
- -The five types of variables are: G - (global), N (node), - X (context), S (suggested), and L (local). The N, X, - and S variables - assume a rule context (that is, they apply only in regions where a rule - has matched, such as @POST). The - G and L - variables are independent of the rule matching machinery.
- -G - = Global - variable: not associated with rules or parse tree nodes.
N - = Node - variable: attached to nodes that match the right-hand-side of a rule, - that is the part of rule to the right of the redirect arrow '<-' .
X = Context - variable: attached to nodes that dominate the phrase that matched a rule.
S = Suggested - variable: attached to the rule reduction node built for the left-hand-side - of a rule.
L = Local - variable: local to a function or region such as @POST and @CODE; also - used as function parameters.
Some operations on these variables include: assignment, printing, arithmetic - and string manipulation. These operations will also be discussed below.
- -In this tutorial, we will use the zipped version of the analyzer in - Tutorial 4. If VisualText has myAnalyzer from the myAnalyzerFolder accessed, - you'll have to close the analyzer. (Select Close - Analyzer from the File Menu.)
- -
First, navigate to:
C:\apps\myAnalyzerFolder
- -and rename the myAnalyzer folder - myAnalyzer4.
- -
Unzip the myAnalyzer4.zip
- file located in:
C:\Program Files\TextAI\VisualText\docs\tutorial4\myAnalyzer4.zip
- -and place the myAnalyzer folder - in the working directory:
- -C:\apps\myAnalyzerFolder
- -Here is a shortcut for loading an analyzer.
- -
Double-click the VisualText icon to launch VisualText.
Select File > Recent
- Analyzers and open:
c:\apps\myanalyzerfolder\myanalyzer
- -This will automatically load the .ana file in the myAnalyzer folder.
- -- -
To illustrate the Global variable (G), - we will use the company2noun pass - file.
- -In Tutorial 4, you added a POST Region directing your analyzer to create - an output file with the text "Found Company: company name". - We will add rules to count the total number of companies in a file and - write this information to the output file.
- -
Double click on the company2noun pass in the Ana Tab.
Edit the company2noun
- pass file so that it looks like this:
@CODE
- -G("companyCount") = - 0; # Set to - 0 (the default).
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@POST
- -# - Increment count of companies.
- -if(G("companyCount"))
- -G("companyCount") = G("companyCount") + 1;
- -else
- -G("companyCount") = 1;
- -- -
# - Print the text from the last node matched (_companies), and the count.
- -"output.txt" - << "Found company: " - << N("$text") << ". - Found "
- -<< - G("companyCount") - << " companies so far\n";
- -- -
single(); - # Do the standard rule reduction.
- -@RULES
- -_noun <- _companies [s] - @@
- - -|
- Note: - Include the extra spaces as they appear in the pass file. This will make - your output file easier to read. |
Let's take a closer look at the rules you just added.
- -There are three regions of our pass file, NODES, - POST and RULES. - It is generally easiest to start an analysis of a pass file by looking - at the RULES Region first.
- -The rule in the RULES - Region
- -_noun <- _companies @@
- -tells the analyzer that any node in the parse tree named _companies is - rewritten with a - new dominating node _noun. The - new node, _noun is layered on - top of the existing node within the parse tree. The node _companies - attached to the company name "Fencetech", for example, will - have the node _noun layered on - top of it.
- -The line @NODES - _ROOT specifies the context in which the rule is applied by the - rule engine. In this case, the rule is applied only to nodes which are - dominated by the node named _ROOT. - Recall that the nodes dominated by _ROOT - are underneath and indented to the right of _ROOT - in the parse tree.
- -Finally, the POST Region contains code "actions" that will - be applied whenever there is a match in the RULES Region. The first part - of our POST Region,
- -G("companyCount")
- -creates a new global variable (G) - named companyCount, if one has - not been previously created. There is no need to declare the variable - in advance.
- -The first four lines of the POST - Region track the count of companies in a file. The global variable companyCount is incremented by one for - every company found.
- -The next part of the POST - Region specifies printing to an output file. The code prints the - company count to the output file "output.txt". It also specifies - a format for printing to the output file. Generally, where and how something - should be printed is controlled by the output operator <<. In this - example, we output to the file 'output.txt' in the following format:
- -"Found Company: Company Name. Found n companies so far."
- -Note that expressions to the right of the output operator can be variables - such as G("companyCount"), literal text surrounded - by double quotes (e.g. "Found company: ") - or formatting characters ("\n" for - newline or "\t" for a tab space). Note also that it is possible - to chain together a series of operations within a single NLP++ statement, - as we did here using multiple output operators.
- -The last part of the POST Region, - single(); as we - learned in Tutorial 4, is an instruction to the rule engine to perform - a standard (or "single-tier") reduction.
- -We - first saw the - variable N - in Tutorial - 4. The node variable is associated with nodes that match elements - on the right hand side of rules and is written in the following way
- -N("variable-name", position-on-right-hand-side-of-rule).
- -A related form is, for example, N(3), which evaluates to the first parse - tree node matching rule element 3.
- -The positions are from 1 to N, and if there is only 1 then the position - reference can be omitted as it has been in our rule statement. The $ prefix - in the argument N("$text"), - indicates this is a special NLP++ variable name, and is reserved. There - are a number of reserved variables that return useful information. See - the Special NLP++ Variables - for a complete list of special reserved variables.
- -N("$text") - in our statement extracts the text under the last node of the right hand - side of the rule, i.e., whatever is in _companies. - In short, the expression
- -"output.txt" << N("$text")
- -extracts whatever is in _companies - and puts it into the output.txt file.
- -The text could also be assigned to another variable associated with - the node, such as:
- -N("string",1) = N("$text",1);
- -and that text could be sent to an output file with the expression:
- -"output.txt" << N("string",1);
- -Note the difference between the node variables N("string") - and N("$text"). - Variables prefixed with the $ are special reserved variables that act - like functions.
- -
Highlight eg2.txt
- in the Text Tab and run the analyzer.
- ![]()
Double click on the output.txt
- file in the examples folder to see the results. It
- should look like this:

If there are any errors in formatting, for example not enough spaces - between text, open the company2noun - pass file and edit accordingly. Run the analyzer again until output.txt - resembles the one above.
- -Now, let's look at a neat way to simplify the counting code in the POST Region. We will do this by using the '++' - operator.
- -
Edit the company2noun
- pass file to simplify it as shown here:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@POST
- -#increment count of companies
- -++G("companyCount");
- -- -
# print out the text from the node of the - last
- -# matching rule element and the count
- -"output.txt" - << "Found company: " - << N("$text") << ". - Found "
- -<< - G("companyCount") - << " companies so far\n";
- -- -
#do a single tier reduce
- -single();
- -- -
@RULES
- -_noun <- _companies [s] - @@
- -Notice that the "if" and "else" statements have - been replaced by the single statement: "++G("companyCount"). The ++ - operator means 'increment the value of the variable by one'. To - decrement something, you can use the decrement operator, --. When - a variable is first used, its value is set to 0 by default.
- -In addition to the increment and decrement operators, NLP++ also supports - the standard arithmetic operators, add(+), substract(-), multiply(*), - and divide(/), as well as the logical operators AND(&&), OR(||), - and NOT(!). One of the text operators include the concatenation operator - (+). You'll see how the + operator works in the next section. For a complete - list of NLP++ operators see the Operators - and Expressions topic.
- -- -
Suppose we wanted to build a list of the companies that have been mentioned - in our text file. To illustrate one way this can be done, we will make - an output file which concatenates the names of the companies in a file - and puts them together on a single line.
- -
Now edit the company2noun
- file so that it looks like the following:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@POST
- -# - increment count of companies
- -++G("companyCount");
- -- -
# print out - the text from the node of the last
- -# matching rule element and the count
- -"output.txt" - << "Found company: " - << N("$text") << ". - Found "
- -<< - G("companyCount") - << " companies so far: ";
- -- -
# concatenate the company names
- -if - (G("outputString"))
- -G("outputString") = G("outputString") + ", - " + N("$text");
- -else
- -G("outputString") = N("$text");
- -- -
# print out - the list of companies found so far
- -"output.txt" - << G("outputString") << "\n";
- -- -
# do a single - tier reduce
- -single();
- -- -
@RULES
- -_noun <- _companies [s] - @@
- -- -
Here's some pseudo code that describes how to concatenate the company - names:
- -If outputString has been declared, then
- concatenate it with the text from the first node element
-otherwise, (if it has not been declared)
- initialize it with the text from the first node element
Select eg2.txt
- and run the analyzer. ![]()
Open output.txt
- and look at the results. You should get the following:

The above output shows the results of applying the
- NLP++ string catenation operator ("+") to build lists.
Now, let's take a look at our third variable S, the suggested variable. S denotes a variable associated with the - left hand side of a rule (the element to the left of the <-), the suggested node or the structural change. - The suggested node is built if a reduce action such as single - is executed, else it is not built. (If the suggested - node is not built, then its S variables are removed - when the rule actions have finished executing.)
- -Earlier in this tutorial we said that we would be extracting the 'head' - noun of a noun phrase. The S variable is going to help us do that. - But first, let's review what a head noun is.
- -A head noun is a technical - linguistic term, like subject, - or indirect object. Head - noun refers to the main, or 'head' word in a noun phrase. - For example, in the phrase 'The man from Philadelphia', 'man' is the head - noun, and determines a number of parameters associated with the noun phrase, - such as whether it is single or plural. Whether a noun phrase is singular - or plural is important for number agreement with the verb. For example, - 'The man - from Philadelphia is...' - vs. 'The men - from Philadelphia are...' - Since the agreement between the head noun and the verb takes place over - unpredictably long distances, some process is needed to extract the value.
- -
Double click on the
- NP pass
- in the Ana Tab.
Modify the NP
- pass to look like this:
- -
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@POST
- -# the variable named - "head" in the suggested node
- -# - gets the text of the LAST node matched by a rule below.
- -S("head") = N("$text");
- -single();
- -@RULES
- -_NP <-
- -_det
- -_xWHITE
- -_adj
- -_xWHITE
- -_adj
- -_xWHITE
- -_noun
- -@@
- -_NP <- _det _xWHITE - _adj _xWHITE _noun - @@
- -_NP <- _det _xWHITE - _noun @@
- -_NP <- _noun @@
- -Basically, what we are doing here is extracting the 'head' noun of a - noun phrase and putting it in a variable named "head". Since - we are using the S - variable, 'head' is associated with the left hand side of the rule, the - _NP.
- -The POST Region applies to all four rules in the subsequent RULES Region. - Since N("$text") - without a rule element number fetches the text of the node matching the - LAST element of a rule, this same action can apply to all four rules, - since they all happen to end with a _noun - element.
- -The net effect of the rules is to extract the text from the _noun - element on the right hand side of each rule, and write the text to a variable - named head which is associated - with the suggested node, named _NP, on the left hand side of each rule. - Each parsed noun phrase will now have an associated head noun. A global - variable wouldn't work in this instance, because there would only be one, - and we need a separate variable 'head' for each noun phrase. S variables - can also serve as "local" variables, since they are visible - only in the context of the current suggested node of a rule. (Whereas - global variables are available anywhere, anytime.)
- -
Select the eg1.txt
- file in the Text Tab and run the
- analyzer. (Select the Generate Logs
- button, so that you can see the intermediate parse tree information.)
Open eg1.txt
- in the Workspace and right click on the text to view the resultant parse
- tree. Click the Toggle Node Variables
- button
to see the variable name (head) and the value assigned
- to the variable for each noun phrase.

Now is a good time to present some other labels you will see attached - to nodes in parse tree displays. In addition to fired - and blt, you may also see the - labels dsem, un - and b attached to nodes. These - labels are summarized in the following table.
- - -|
- Label |
-
- Description |
|
- dsem |
-
- The node has some 'semantic' variables set. |
|
- un |
-
- The node is unsealed. A sealed node does not - expose its internal structure to the rule engine, so additional rules - cannot apply and alter it. If a node is set to unsealed, its structure - is available for taking part in later rules. |
|
- b |
-
- "b" is for "base" and - tells the rule matcher to stop looking down singlets in this node. A singlet - is a node label that dominates (contains) another single node. For example, - in (NP (N John)) - there is only one node, labeled N, - having the text John, - contained in the node NP. - The NP node is a singlet, and - so is the N. The N - is available (exposed) to match the structure description (right hand - side) of later rules. If the NP - node's base attribute is set, the N - will not be available to later rules. |
|
- sem |
-
- Used for internal semantic data structures - that the user doesn't have access to. |
Now that we are extracting the head nouns from noun phrases, let's extract - the head noun of the direct object from the elements of the verb phrase - and associate it with the verb phrase node.
- -
Double click the VP
- pass in the Ana Tab and edit it
- so that it looks like this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES _ROOT
- -- -
@POST
- -S("directObject") = N("head",5);
- -S("indirectObject") = N("head",3);
- -single();
- -@RULES
- -_VP <- _verb _xWHITE - _NP _xWHITE _NP - @@
- -- -
@POST
- -S("directObject") = N("head",3);
- -single();
- -@RULES
- -_VP <- _verb _xWHITE - _NP _xWHITE _PP - @@
- -- -
@POST
- -S("directObject") = N("head",5);
- -single();
- -@RULES
- -_VP <- _verb _xWHITE - _PP _xWHITE _NP - @@
- -- -
@POST
- -S("directObject") = N("head",3);
- -single();
- -@RULES
- -_VP <- _verb _xWHITE _NP @@
- -- -
@RULES
- -_VP <- _verb _xWHITE - _PP @@
- -_VP <- _verb @@
- -- -
The line
- -S("directObject") = N("head", 5);
- -handles sentences like "John gave Mary the book" where "the - book" is the direct object, i.e. the 5th element, _NP. - The rule takes the value of a variable named head - associated with the 5th element (an NP) of the right hand side of the - following syntactic rule, and copies it to a variable named directObject associated with the suggested node - on the left hand side of the syntactic rule (the VP). The value - of the variable head was assigned - in the preceding NP pass.
- -The multiple POST and RULES - sections are matched to extract the correct arguments (5, 3, 5, 3), i.e. - the element corresponding to _NP - in each rule. The last two rules do not have direct objects, so - the value of the variable directObject is left - alone (i.e., it will default to zero). Note that the lone @RULES specifier resets the subsequent rules to - have the default POST Action, i.e. - the implicit single reduce action.
- -
Run the analyzer on the eg1.txt
- and view the resultant parse tree.
- -
Having extracted head nouns and figured out which NPs are direct objects, - we're ready to complete the analysis of major syntactic categories. Also, - we're ready to introduce the last of the five special variable types in - NLP++, the context, - or X - variables. To do this, we need to add another pass to our analyzer sequence.
- -
Click on the Sentence
- pass in the Ana Tab. Right click
- and select Add > New Pass.
Name the new pass, roles.
Leave Type as Pattern and click OK.
The purpose of the roles pass is to extract the subject and object - of a sentence.
- -
Double-click the roles pass
- and edit so that it looks like this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@PATH - _ROOT _S
- -- -
@POST
- -X("subject",2) = N("head");
- -noop();
- -@RULES
- -_xNIL - <- _NP @@
- -- -
@POST
- -X("object",2) = N("directObject");
- -# noop();
- -@RULES
- -_xNIL - <- _VP @@
- -The structure of this pass file is a little different than the other - pass files we have been editing in this tutorial. Let's take a closer - look at each section of the file.
- -The line
- -@PATH _ROOT _S
- -is different from what we've seen before. Earlier, we only made references - to the SELECT Region
- -@NODES _ROOT
- -The @PATH - _ROOT - _S syntax instructs the rule matching engine to look only at a - path from the root of the parse tree, _ROOT, - down to its direct child _S when - trying to match the rules of the current pass. This means that not - any old NP will match, but only NPs that are dominated by _S, - which in turn are dominated by _ROOT. - Similarly, not any old VP will match, but only those dominated by _S dominated by _ROOT.
- -X(variable-name,position) - is the prototype of the fourth variable type. The line
- -X("subject",2) = N("head");
- -assigns to the second context node in the @PATH list, that is, - _S, a variable named subject. - The rule engine copies into that variable the value of the variable named - head - which is associated with the (default) first element of the syntactic - rule (i.e., _NP).
- -The line noop(); means 'no operation', and means that - no reduction should take place in the syntactic rule. That is, do - not place an _xNIL - on top of the _NP. This - is a method for finding a node to match without modifying the parse tree.
- -The second rule set matching against a _VP - extracts the value of directObject - associated with the _VP and copies - it into a variable named object - associated with the context node _S. - Note that we don't need to explicitly add a noop - action. Once a POST Region is non-empty, the default single - action is displaced. The commented noop - action reminds us that there is no implicit reduce action in a non-empty - POST Region.
- -- -
Finally, let's create another pass file to print out the subject and - object roles for each of the sentences in eg1.txt.
- -
In the Ana Tab,
- highlight the roles pass.
Right click and select Add
- > New Pass.
Name the new pass
- printRoles.
- Leave Type
- as Pattern
- and click OK.
Double-click the printRoles pass
- and edit so that it looks like this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@POST
- -"output.txt" - << "sentence: " << - phrasetext() << - "\n";
- -if - (N("subject"))
- -"output.txt" - << "subject: " << - N("subject") - << "\n";
- -if - (N("object"))
- -"output.txt" - << "object: " << - N("object") - << "\n";
- -"output.txt" - << "\n";
- -@RULES
- -_xNIL - <- _S @@
- -This pass looks for a node labeled _S - dominated by _ROOT. If it finds - one, it prints out the text of all the nodes that matched the right hand - side, using the predefined function phrasetext. - Then it prints the value of _S's - variables named subject and object. - Finally, it terminates the output for each sentence with a blank line.
- -
Run the analyzer on eg1.txt.
Open the output.txt
- file located under eg1.txt. Output.txt
- should look like this:

If your results are different, go back to the last three pass files - we edited, printRoles (pass 17), - roles (pass 16) - and VP (pass 14) - to make sure the code is the same.
- -
Now open the examples
- folder and run the analyzer on eg2.txt.
The results in the output.txt - file should look like this:
- -
- 
Notice that the information generated from the printRoles - pass has been appended to the output.txt file.
- -
Close the open files in the Workspace.
Exit the analyzer (File
- > Exit.) and save whatever is asked to be saved.
In this tutorial, we introduced five types of NLP++ variables:
- -global - (G) - variables;
variables attached to - rule element nodes - (N) - associated with the structural description (right hand side) of a rule;
variables associated - with context - (X), - or the dominating nodes of the structural description of a rule;
One way to think of these four types of variables is to remember that - a global variable can be anywhere, but with only one instance. For the - other three, imagine an abstract NLP++ pass:
- -@NODES - X
- -@RULES
- -S - <- N ... @@
- -Variables of type X - are associated with the context of a rule, variables of N - are on the right side and variables of type S - on the left.
- -Operations on the variables introduced were:
- -printing;
arithmetic; and
We also introduced a new type of context selector, - the PATH selector, which specifies a more - constrained context for the application of rules than the NODES selector introduced earlier.
- -- - - - diff --git a/Help/helps/Tutorials/tutorial6/tutorial6.html b/Help/helps/Tutorials/tutorial6/tutorial6.html deleted file mode 100644 index f368986..0000000 --- a/Help/helps/Tutorials/tutorial6/tutorial6.html +++ /dev/null @@ -1,1676 +0,0 @@ - - - - - - - - - - -
In this tutorial we will cover more details of rule construction. - We will review rule element conditions, special rule elements and some - code region rule conditions.
- -The analyzer we will start with in the this tutorial, is the one that - you created in Tutorial 3. If you are taking Tutorial 6 directly after - Tutorial 5, you will have to close myAnalyzer - before going through the steps below. (Select Close - Analyzer from the File Menu.)
- -
Rename the myAnalyzer
- folder in:
C:\apps\myAnalyzerFolder
- -to myAnalyzer5.
- -
If you saved myAnalyzer3 at the end of Tutorial 3, you
- can copy that and rename it to myAnalyzer.
OR, if available, do the following. (If not available,
- you'll need to go through Tutorials 1, 2, and 3, executing the yellow
- arrow instructions.) Unzip
- the myAnalyzer3.zip located in
- the release directory:
C:\Program Files\TextAI\VisualText\docs\tutorial3\myAnalyzer3.zip
- -and place the myAnalyzer folder - in the working directory:
- -C:\apps\myAnalyzerFolder
- -
Launch VisualText and open the myanalyzer.ana
- file located in
C:\apps\myAnalyzerFolder\myAnalyzer
- -or select File > Recent Analyzers - > c:\apps\myanalyzerfolder\myanalyzer
- -
In the Ana Tab,
- double-click on the NP pass to
- open it in the Workspace.
Here are the NP rules created by the end of Tutorial 3:
- -
Our current NP pass file will work for sentences in which we have a - maximum of two adjectives preceding a noun. However, for sentences in - which there are more than three adjectives in succession, such as ''He's - a big brown friendly dog." the rules in our NP file are insufficient. - Of course, if we wanted to, we could add another rule to our NP pass file - to account for this. But since there are many possibilities, our rule - file would get extremely bulky. A more efficient way to handle cases like - this is to use a 'recursive' pass.
- -The recursive algorithm will apply the rules within each context node - (i.e., each node found by a NODES or PATH selector) until no more matches are found. - Let's create a recursive pass now to see how this works.
- -We will create a new pass just after the POSS - pass in the analyzer sequence.
- -
In
- the Ana Tab, click
- on POSS, right-click and select
- Add > New Pass.
- (You'll see why we are placing a new pass file at this point in the analyzer
- sequence in a moment.)
- -
In the Pass Properties
- dialog, name the pass recursiveAdj
For Type, select Recursive.
- Click OK.
Notice the R - next to the new pass in the Ana Tab. - This lets you know that it as a recursive - pass.
- -
Double click recursiveAdj
- pass (pass #10) to open it in the Workspace.
Edit the pass file so that it looks like this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@RULES
- -_adj <- _adj _xWHITE - _adj @@
- -Your Ana Tab should look like this:
- -
This rule will recursively join adjacent adjectives (separated by a - single space), so that the dominating _adj - built by one instance of this rule matching becomes element one the next - time this rule is matched. The recursion stops when no rules match.
- -The recursiveAdj pass is placed after the POSS pass - so that possessives can be collected into lists of adjectives. It precedes - the NP pass so that adjective lists can be collected into noun phrases. - This illustrates that multi-pass text analyzers are sensitive to the ordering - of passes.
- -The rule matcher looks for context (that is, the dominating node, in - this case _ROOT ) and then tries - to match rules in the phrase of children under the context nodes. - In this case, the rule matcher finds _ROOT, - then finds the first instance of '_adj - _xWHITE _adj'. It reduces this to a single - _adj and then continues looking - within the _ROOT context node - for another match of the pattern. It uses the newly created _adj node as the first element of the - rule and searches for an _xWHITE _adj to complete the rest of the rule. - As you will see below in the tree structure, the leftmost '_adj - _xWHITE _adj' becomes the most deeply embedded - phrase.
- -When the recursive pass can no longer match rules in a phrase, the rule - matcher tries to find (i.e. select - via NODES - or PATH) - another context node that matches. If there is another string of adjectives - later, the same algorithm applies. When this finishes, the rule - matcher looks for another context node. In this case, there is only - one context node _ROOT in the - parse tree, so the algorithm stops here. In a slightly different - situation, where the context node was not _ROOT - but rather a node name that appeared more than once in the parse tree, - the recursive algorithm would apply to each of those context nodes. (This - selection mechanism is also used by the nonrecursive pat - algorithm.)
- -What happens with a noop rule, - i.e., one that does consume a phrase of nodes to build a new dominating - node? The recursive algorithm pretends that a noop rule has failed and - keeps looking in the phrase for a "real" rule match, i.e., one - that modifies the parse tree. Had the noop rule match been counted a success, - the recursive algorithm would fail to terminate (i.e., it would be in - an infinite loop) whenever it matched a noop rule. (There are several - other ways to get into an infinite grammar loop, as you may discover!)
- -Look at the sequence of passes in our analyzer. Notice that recursiveAdj - occurs before the NP pass. Since - the analyzer goes from pass to pass along the chain, instances of multiple - adjectives occurring together will be handled by the recursiveAdj - pass making some of the rules in our NP pass file redundant.
- -
Edit the NP pass
- file so that the first rule (the rule highlighted below) is deleted from
- the file:

To test our recursive adjective rule, let's create a new text file with - lots of adjectives.
- -
In the Text Tab
- window, right click and select Add >
- New Text File.
Name the file eg2.txt. Add the following sentence:
John gave the quick little brown fox's baby's yellow book to Mary.
- -
Click the Run
- button to run the analyzer.
Right click on eg2.txt
- in the Workspace and select View >
- Parse Tree.
Under the second _NP
- node, expand the _adj node to
- see the effect of the recursive algorithm:

There's a way to build a more efficient and compact list, such as the - list of adjectives that we have built up to this point. Also, to reflect the difference between a lone adjective - and an adjective list, we'll create a new nonliteral, - or abstract name, called _adjlist.
- -
Edit the recursiveAdj
- pass file to look like:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@RULES
- -#_adj - <- _adj _xWHITE _adj @@
- -_adjlist [base] - <- _adj @@
- -- -
@POST
- -listadd(1,3, - "false");
- -@RULES
- -_xNIL - <- _adjlist _xWHITE - _adj @@
- -The first rule (_adjlist - [base] - <- _adj) builds an adjective list from one adjective. The second - rule (_xNIL <- adjlist _xWHITE - _adj) uses a special reduce action called - listadd in order to extend an adjective list with - one adjective node. Rather than building a new list node, listadd places the new _adj - node under the list of nodes already collected under the _adjlist - node. The arguments to listadd are
- -listadd(<element - number of the list node>, <element number of the new element to - add to list>, <true/false to also collect nodes between the list - node and new element node.)
- -The base attribute - in the first rule keeps the recursive algorithm from finding _adj - within _adjlist and getting stuck - in an infinite loop. It's not strictly necessary in the rule as written, - but would be necessary if written as
- -_adjlist [base] - <- _adj [s] @@
- -where the element - action s (for singlet) leads to finding _adj even when it is buried - under _adjlist.
- -
If not enabled, select the Toggle
- Generate Logs button on the toolbar.
Run the analyzer on eg2.txt.
Select the recursiveAdj
- pass in the analyzer sequence. Then right click on eg2.txt
- in the Workspace and View > Parse
- Tree.
- Notice how all of the adjectives
- are now part of _adjlist.

This version of the adjective list is more practically useful than the - first form we built. It's more compact, easier to read, faster and easier - to traverse. The philosophy underlying NLP++ is to support similar engineering - of text analyzers in enhanced ways wherever feasible.
- -
To integrate _adjlist
- into the analyzer, edit the first _NP
- rule in the NP pass file to use
- _adjlist instead of _adj.
The first rule in your NP pass file should look like this:
- -_NP <- _det _xWHITE _adjlist - _xWHITE - _noun @@
- -- -
You just learned how to create a recursive pass file. We made the recursiveAdj - pass file so that we could account for multiple adjectives such as 'the - big brown friendly dog' without having to write individual rules to cover - the number of different possible ways adjectives can be used in sentences. - One other way to optimize rules is by using the optional element modifier [opt]. - Though it is possible to specify every variant of the same basic rule, - we can cut down on the number of rules in a pass file by using [opt]. Some might argue that optional rule elements - make the rules less comprehensible. Nevertheless, they can be useful for - development, and in some situations may even help to clarify the rules.
- -For example, the first rule of our NP pass file has two optional elements, - _adjlist (an adjective) and _xWHITE (a white space). - You can rewrite the rule to indicate that these two elements are optional - like this:
- -NP <- _det _xWHITE _adjlist - [opt] _xWHITE - [opt] _noun @@
- -
Edit the first rule of your NP
- pass file using the [opt] element modifier.
While we are at it, go ahead and eliminate the second
- rule in the NP pass file since
- the rule is now redundant with the first rule. That is, the rule _NP <- _det
- _xWHITE _noun
- is now contained or covered by the first rule.
Your NP pass file should look like this:
- -
Optional elements that place conditions on rule elements such as [opt] must be contained in square brackets. See - Phrase Element - Modifiers for more information on [opt] - and other - modifiers that can be used with rule elements.
- -We've already seen some of the conditions that the automatic rule generator - uses.
- -For example, in the verb rule below:
- -
there's a list of conditions in the square brackets.
- -_xWILD - is a special rule element, and very useful. It behaves like - any other rule element, such as _NP - or _verb, in the sense that the - text of that element can be extracted, or the node operated on, but special - rule elements have properties that make writing rules easy.
- -The rule element _xWILD is an unrestricted - wildcard and will match zero or more tokens. For example, in a rule - like
- -_foo <- four _xWILD seven @@
- -a phrase of nodes in the parse tree corresponding - to 'four five six seven' would match and the new node _foo would be created.
- -In the rule
- -_verb <- _xWILD [min=1 max=1 s match=("gave" "jumped" "kissed")] @@
- -what _xWILD can match is specified - in a match list. The list of possible matches for _xWILD - are gave, jumped - and kissed.
- -_xWILD is a unique rule element in that what - it matches depends on the element following it in a rule. By contrast, - _xANY (which - matches any single node) in the following rule
- -_ABC <- PQR _xANY [min=1 - max=5] - XYZ @@
- -will greedily gobble up any - XYZ node that it encounters, possibly failing though it "could" - have matched. Only _xWILD knows how to "back - up" to make such a rule match succeed.
- -- -
If the match list were absent, this rule would match any single node. - Items in the match list can be literals, as is the case in this rule, - but they can also be nonliterals, such as _NP - or _noun. - min=1 - means match a minimum of 1 element. min=0 - would mean the current element is optional, and is the same as using opt. max=1 - means match a maximum of 1 element. max=0 - means the current element can match an indefinite number of nodes. - In addition to the match list, there is also a fail - list, which uses the same syntax ('fail=("X", "Y", - "Z")') but means fail to match the rule if any of the listed - items are present in the input. The element modifiers fail and match are - further discussed in the Phrase - Element Modifiers topic.
- -Here is a list of the special rule elements in NLP++.
- -- - -
|
- Rule Element |
-
- Description |
|
- _xWILD |
-
- Matches any nodes and any number of nodes. - An intelligent matcher that is "back up aware." |
| - | -
- Matches any single token. A dumb or greedy - matcher that can't "back up" the way _xWILD - can. |
| - | -
- Matches an alphabetic - token. |
| - | -
- Matches a numeric token. |
| - | -
- Matches a punctuation - token. |
| - | -
- Matches a whitespace - token, including newline. |
| - | -
- Matches a whitespace - token, excluding newline. Equivalent to _xWILD [match=(\ - \t)] |
| - | -
- Matches an alphabetic - with uppercase first letter. |
| - | -
- Matches the end of file. |
| - | -
- Matches if at the start - of a phrase in the parse tree. |
| - | -
- Matches if at the end - of a phrase in the parse tree. |
We'll use _xALPHA in our next example.
- -In the previous tutorials, you were introduced to some of the different - regions of a pass file, namely POST and RULES. We also briefly saw what the PRE Region does in Tutorial 4. These different - regions are used to control the application of rules in a pass file. Here - we will summarize these three regions and also introduce a new region, - the CHECK Region. - These are the main regions used in pass files.
- -PRE - Additional conditions on the matching of individual - rule elements.
CHECK - When a rule has matched, these actions check self-consistency - and/or build semantic data. These actions can be used to reject a rule - match.
POST - Actions that operate once a rule match has been - accepted. Parse tree modifications (e.g., reduce actions) are typically - performed here.
RULES - Subregion containing the actual rules that are - subject to immediately preceding PRE,CHECK, and POST subregions.
Each region has a set of begin and end markers for - it: @PRE and @@PRE, @CHECK and @@CHECK, @POST and @@POST, @RULES and @@RULES. You may - wonder why we have not been using the end markers in the pass files we - have been editing. The use of end markers is optional when writing pass - files. Some people like using the end markers to make - the pass file easier to read. This is a matter of personal preference.
- -In the next example, we will use the PRE Region to control the - application of a rule. The PRE Region along with CHECK, POST and RULES - make up the Grammar Region of a pass file. See the Grammar - Region topic for more information.
- -- -
The PRE Region places conditions - on individual rule elements and operates during the rule matching of a - rule. Suppose we want to add to our system the capability to categorize - unknown words. Given the sentence, 'The XZY - took the QRS - to LMNO" - we might infer that the capitalized phrases, XZY, - QRS and LMNO - were nouns. (Basically, any uppercase word of a certain size is - likely to be an acronym, and a noun.) We can set up the conditions in - the PRE Region so that words in all - capital letters are identified as nouns. To illustrate this, we will have - to create another pass in the analyzer sequence. We'll place it before - the POSS pass, since we're building nouns that can potentially be used - in possessive constructs (e.g., "IBM's software").
- -
In the Ana
- Tab, create a new pass
- just before the
- POSS pass. (Select end_words. Right click, Add > New Pass)
Name the pass, Acronyms.
- Leave Type: as Pattern and click OK.
Double click the Acronym
- pass and edit so that it looks like this:
@CODE
- -L("hello") = 0;
- -@@CODE
- -- -
@NODES - _ROOT
- -- -
@PRE
- -<1,1> - uppercase();
- -<1,1> - lengthr(3,10);
- -@RULES
- -_noun <- _xALPHA - @@
- -Let's look at the conditions in the PRE Region.
- -<1,1> uppercase();
- means 'from the first element to the first element of the rule, the elements
- must be all uppercase in order for this rule to match.'
-<1,1> lengthr(3,10); means from the 'first element
- to the first element, the element must be a minimum of three characters
- long and a maximum of 10.'
In other words, if _xALPHA - (the first element of our rule) is composed of uppercase letters, and - is between three and ten characters long, create a dominating node named - _noun.
- -Both uppercase and lengthr are special NLP++ functions - and are called "PRE Actions". You'll learn more about these - later.
- -
Running the analyzer on the sentence
TAI gave VISUALTEXT to the WORLD.
- -produces a parse tree like:
- -
Notice how TAI, WORLD and VISUALTEXT have been identified as nouns.
- -The PRE Region handles only special - functions (called PRE Actions). It - does not yet understand NLP++ expressions and statements.
- -
Close the files in the workspace and exit the analyzer.
In this tutorial we introduced the recursive
- pass-algorithm and showed that it could handle an indefinitely long list
- (e.g., of adjectives). We looked at other features of rule construction,
- such as making elements optional [opt].
- We reviewed special rule elements, showing _xWILD and _xALPHA in action, and finished
- with some conditions placed on rule elements in the PRE
- Region.
-
-
-
-
-
-
NOTE: - Some users find a Microsoft library missing when they run VisualText Unicode. - support@textanalysis.com - can help with any problems.
- -Unicode_Test is an analyzer supplied with the release, at Program Files/TextAI/VisualText/apps. - It provides - sample input files that can be loaded and processed to produce a tokenized - parse tree for various test languages. VisualTextU.exe, - the version of VisualText that supports Unicode, should be invoked in - order to run this analyzer.
- -- - - - diff --git a/Help/helps/Updating_Analyzers_and_KBs.htm b/Help/helps/Updating_Analyzers_and_KBs.htm deleted file mode 100644 index 33bd800..0000000 --- a/Help/helps/Updating_Analyzers_and_KBs.htm +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - - - - -
This topic applies to the latest version of VisualText. You - may want to read the topic Compiled - and Standalone Analyzers for background.
- -In case you need to merge code from your old analyzers, we recommend - using WinDiff (available with - MS Visual Studio 6.0). Also, - note the new include files referenced in the prog and user projects, as - well as code changes that compile with both Unicode and non-Unicode configurations - (see the API header file Program Files\TextAI\include\Api\my_tchar.h - as well as studying the new code files). Finally, - note that the prog, kb, run, and user projects now all include Unicode_Release - configurations which may need to be compiled for Unicode VisualText.
- -WARNING: BEFORE - uninstalling an older VisualText and installing a later version, one should - do steps [1] and [2] below.
- -LIMITATION: - At present, we have no simple method for converting a Unicode KB to an - ANSI KB. You - may need to manually edit out all Unicode characters.
- -[1] Get - interpreted KB. For - each analyzer you want to update, you'll need to make sure it has an up-to-date - INTERPRETED form of the knowledge base. This - is because compiled KBs (kb.dll) will not load with the new VisualText.
- -
Simplest is to click the Save KB button (or select Save
- KB from the KB menu). This
- assures that you generate the latest interpreted version of a knowledge
- base, whether you use a compiled analyzer or not.
[2] Back - up analyzers. Prior - to upgrading the VisualText version, make a safe copy of your analyzers. - This will - give you a fallback in case something goes wrong during the update process.
- -[3] Install - new VisualText.
- -
Follow the instructions provided to you with the latest
- version of VisualText.
[4] Create - new analyzer. In - general, the best way to update an analyzer is to create a new version - from scratch, then merge parts of the old analyzer into the new.
- -
Rename the old analyzer, e.g. c:\apps\myAnalyzer to c:\apps\myAnalyzer_saf
Create a new analyzer of the same name by invoking VisualText,
- selecting File > New Analyzer, and selecting the Bare template.
If you will use a compiled KB, check the box at File
- > Preferences > Analyzer Dependent > Load Compiled KB. (Don't
- worry, if the analyzer doesn't find a compiled KB it will still load the
- interpreted KB.)
Exit VisualText.
Next we'll merge the old analyzer into the new, one piece at a time.
- -[5] Merge - KB.
- -
Copy the interpreted kb from your old analyzer, e.g.,
- at myAnalyzer_saf\kb\user.
Paste this user folder into the new analyzer at myAnalyzer\kb. (Yes
- to overwrite everything).
[6] Merge - Run. The - analyzer's \run folder is automatically - managed by VisualText, so don't muck around in here! Once - it's updated, you can manually compile the analyzer in here. (Professional - version only.)
- -[7] Merge Prog. Prog - is a sample driver program that comes with an analyzer. (Usable in Professional - version only.)
- -
If you use the Prog driver, then follow instructions
- in the Compiled
- and Standalone Analyzers topic.
If you've made your own modifications, you'll need to
- manually merge \myAnalyzer_saf
- files into \myAnalyzer.
Compile the Release or Unicode_Release configuration,
- as appropriate.
[8] Merge - User Project. An - analyzer's user project is where extensions to the NLP++ language can - be added, third party code can be integrated, and so on.
- -
If you haven't modified the user proejct, then you're
- done.
If you have modified the user project, you'll need to
- merge your code from myAnalyzer_saf\user
- with myAnalyze\user.
Compile the Release or Unicode_Release configuration,
- as appropriate.
[1] In 2.0.1.x and later, various analyzer DLLs have been moved and - renamed. In - most cases, you'll find them in the \bin - folder of a project, with names to distinguish Unicode from non-Unicode - versions.
- -[2] Non-Unicode analyzers should be amenable to loading in the Unicode - VisualText. However, - Unicode analyzers will not load correctly in the ANSI VisualText.
- -[3] We recommend using a particular analyzer with either ANSI VisualText - or Unicode VisualText, not both. Once - you start placing Unicode characters in analyzers and knowledge bases, - you can't then run them in the ANSI VisualText.
- -[4] We recommend naming analyzers according to whether they are Unicode - or ANSI.
- -- - - - diff --git a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Adding_passes.htm b/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Adding_passes.htm deleted file mode 100644 index 2de32ff..0000000 --- a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Adding_passes.htm +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - - - - -
When you add a pass to the analyzer sequence you are also creating the - pass file that is associated with the pass. You can associate existing - pass files from another analyzer project with a new pass in the analyzer - sequence.
- -VisualText also comes with a set of library - passes that can be added to the analyzer sequence. Library - passes are pre-built passes that contain code to recognize telephone numbers, - email addresses, dates, money and other common patterns. Some library - passes are available as VisualText analyzer templates.
- -To add a new pass - to the analyzer sequence:
- -In the Ana Tab, - click on the pass in the sequence where you want to insert the pass. The - new pass will be added AFTER the pass you select.
With the mouse in the Ana Tab, right-click and - select Add > New - Pass.
In the Pass Properties - dialog box, give the pass file a name. (For pass names with multiple words, we - recommend using an underscore between the words.) For - Type, - select Pattern for a pattern based pass or Recursive for a recursive one. - By default the pass is set with the Active flag, meaning the pass will be processed - the next time the analyzer is run. (To inactivate the pass, see Inactivating - a pass.)
Click OK to finish creating the pass. The newly pass - is added to analyzer sequence.
To associate - an existing pass file with a pass in the analyzer sequence:
- -In the Ana Tab, - click on the pass in the sequence where you want to insert the pass. The - new pass will be added AFTER the pass you select.
Right-click and select Add - > Pass from File.
Navigate to the directory where the pass file - exists. (For - example, c:\apps\myAnalyzer\spec.)
Select the pass - file and click Open. The - pass is added to the analyzer sequence. The - name of the pass defaults to the name of the existing pass file.
To add a library - pass to the analyzer sequence:
- -In the Ana Tab, - click on the pass in the sequence where you want to insert the pass. The - new pass will be added AFTER the pass you select. If - a library pass contains more than one pass in the sequence, all passes - are added to the Ana Tab. The - number following the library pass name indicates the total number of passes - in the sequence.
Right-click and select Add - > Library Pass.
Select - the pass from the menu.
|
- Note: - You must - change the Pass Properties on some library passes in order for them to - work correctly. By - default, the Pass Property Type is set to Pattern. Pattern - should be changed to Recursive - for the following: -- -
| ||||||||||
|
-
|
- -
- - -
|
- Tip: - You can add pass files to TextAI\VisualText\data\spec directory located - in the install directory to create your own set of library of passes. - |
- -
- -
- - - - diff --git a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Editing_pass_files.htm b/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Editing_pass_files.htm deleted file mode 100644 index a0cd072..0000000 --- a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Editing_pass_files.htm +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - -
To edit a pass file associated with - a pass in the analyzer sequence:
- -In the Ana Tab, - double click the pass in the analyzer - sequence. The associated pass file opens up in the Workspace.
|
- Tip: - You can also open the pass file by selecting the pass in the sequence, - right-clicking and selecting Edit - > Pass File. |
|
- Note: - For help writing rules, refer to the NLP++ section. |
- - - - diff --git a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Moving_passes.htm b/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Moving_passes.htm deleted file mode 100644 index eed090e..0000000 --- a/Help/helps/Using_VisualText/Analyzer_Sequence/Hand-Built_Pass_Files/Moving_passes.htm +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - -
Passes, whether they are a part of a stub region or not, can be moved - around in the analyzer sequence.
- -To move a pass in the analyzer sequence:
- -In the Ana Tab, - select the pass you want to move.
Click on the yellow up
-
or down
arrows on the Tab Toolbar, to move the pass to the desired
- location.
|
- Note: -
|
- -
- - - - diff --git a/Help/helps/Using_VisualText/Analyzer_Sequence/Opening_Pass_Files.htm b/Help/helps/Using_VisualText/Analyzer_Sequence/Opening_Pass_Files.htm deleted file mode 100644 index 8105421..0000000 --- a/Help/helps/Using_VisualText/Analyzer_Sequence/Opening_Pass_Files.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - -
To open a pass file associated with - a pass in the analyzer sequence:
- -In the Ana Tab, - double-click on the pass. The - pass file associated with the pass opens in the Workspace.
|
- Tip: - You can also right-click and select Edit - Pass File from the pulldown menu. |
To close an analyzer:
- -From the File - menu, select Close Analyzer. If - the analyzer has been modified, you will be prompted to save the analyzer - before closing.
|
- Tip: - You can also close the currently loaded analyzer by selecting Open Analyzer, navigating to another - analyzer project and opening the .ana file. You can also close an analyzer - by selecting an analyzer from the drop-down list under Recent - Analyzers. |
- -
- - - - diff --git a/Help/helps/Using_VisualText/Analyzers/Creating_analyzers.htm b/Help/helps/Using_VisualText/Analyzers/Creating_analyzers.htm deleted file mode 100644 index f6c12ca..0000000 --- a/Help/helps/Using_VisualText/Analyzers/Creating_analyzers.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -
To create an analyzer:
- -From the File - menu, select New Analyzer.
In the New Analyzer - dialog, give the analyzer a name. - This name will be used to organize the analyzer project. VisualText automatically - assigns a .ana extension to - the name to mark it as the analyzer project file. You use the .ana file - to open the analyzer project.
Specify the drive and folder where you want the - analyzer project and its files to be created in Location. - The application directory defaults - to c:\apps. (You can change the default application directory in the Preferences - dialog.)
For Template, - select one of the templates under Type. - (For more - on templates, see Analyzer - Templates.)
Click OK - to finish creating the analyzer project.
- -
Opening analyzers
-Structure of analyzer projects
-Setting VisualText Preferences
There are several ways to open an analyzer project.
- -To open an analyzer, using Open Analyzer:
- -From the File - menu, select Open Analyzer.
In the Open - dialog, navigate to the drive and the folder containing the .ana file.
Select the .ana - file and click Open.
To open an analyzer, using Recent Analyzers:
- -From the File - menu, select Recent Analyzers.
Select the analyzer name from the drop-down list. - (Analyzer names in the drop-down list do not contain the .ana extension.)
|
- Note: If you already - have an analyzer open, using Open Analyzer or Recent Analyzers will close the currently loaded analyzer. If the current - analyzer has not been saved, you will be prompted to save the analyzer - before the analyzer is loaded. |
|
- Tip: You can also set - the preferences to open the last analyzer loaded when the program is launched - by checking "Auto Load Last Analyzer" in the General Tab of - the Preferences box. |
To save an analyzer:
- -Select Save Analyzer - from the File menu. Save Analyzer - saves the analyzer project and the associated Knowledge Base.
Answer Yes - to the prompt asking if you want to save the analyzer.
Closing analyzers
-Opening analyzers
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_Label_Concepts.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_Label_Concepts.htm deleted file mode 100644 index 93e72e7..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_Label_Concepts.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - -
Label concepts hold subsamples of larger concepts. For - example, the area code or exchange of a telephone number can be a subsample - of a telephone number.
- -To add a label concept to a rule concept:
- -In the Gram Tab, - select the rule concept where you want to add the label concept.
Right-click and select Add - > Label.
Give the label concept a name - in the dialog box.
Click OK - to finish adding the label concept.
|
- Note: - Label concepts can only be added to rule concepts. |
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_folders.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_folders.htm deleted file mode 100644 index 3977c6c..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_folders.htm +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - -
Folder concepts are used to organize multiple types of samples.
- -To add a folder concept to a stub:
- -In the Gram Tab, - select the stub concept where you want to insert the folder concept.
Right click and select Add - > Folder.
Give the folder concept a name - in the dialog box.
Click OK - to finish adding the folder concept.
|
- Note: Folder concepts can be added to stub - concepts. |
- - -
|
- Tip: -
|
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_rule_concepts.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_rule_concepts.htm deleted file mode 100644 index 624f954..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_rule_concepts.htm +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - -
Rule concepts own a set of related samples, from which the rule generator - will generalize, merge and generate rules.
- -To add a rule concept to a stub:
- -In the Gram Tab, - select the stub where you want to add the rule concept.
Right click and select Add - > Rule.
Give the rule concept a name - in the dialog box.
Click OK - to finish adding the rule concept.
|
- Note: Rule concepts can be added to stub - and folder concepts. |
- - -
|
- Tip: -
|
- -
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_samples_to_rule_concepts.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_samples_to_rule_concepts.htm deleted file mode 100644 index cbcc8a1..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_samples_to_rule_concepts.htm +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - -
There are several ways to add samples to a rule concept. You can add - samples to rules by highlighting example text from a text file in the - Workspace, or by importing lists of samples from an existing text file.
- -To add samples using a text file in - the Workspace:
- -Double click on the text file - in the Text Tab to open it in - the Workspace.
In the Gram Tab, - select the rule concept you want - to add samples to. The arrow in front of the rule concept turns blue.
In the text file, highlight the word - (or phrase) that corresponds - to the rule concept.
Right click and select the rule - concept name listed in the pulldown menu. The sample is added below - and indented to the right of the rule concept.
|
- Tip: - If you are using folders to organize your rule concepts, select the folder instead of the individual rule concept to see all the - rule concepts in the pulldown menu when you highlight text. |
Adding samples already contained in a file is a fast and easy way to - add samples to a rule concept. This is particularly helpful when you have - lists of names or other such data.
- -To add samples by importing a text - file:
- -In the Gram Tab, - select the rule concept you want - to add samples to. The arrow in front of the rule concept turns blue.
Right-click and select Sample - File > Import.
VisualText will warn you that importing samples - from a file will delete any samples you may have for the rule concept. - Since you don't have any samples for the rule concept yet, click Yes. The warning is for those who already - have samples for the rule concept.
In the Open - dialog, navigate to the directory containing the file of samples.
Select the file - you want to import and click Open. - The samples are added below and indented to the right of the rule concept.
|
- Note: Each line of your text file must - contain one sample only. |
|
- WARNING: - Make sure all edits to be made from a text file you are sampling have - been made to the file BEFORE you - start sampling. Once you start sampling the file, you can't edit it. |
- -
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_stub_regions.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_stub_regions.htm deleted file mode 100644 index 9269168..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Adding_stub_regions.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - -
The stub concept is the primary organizer of user-highlighted samples.
- -To add a stub concept:
- -In the Ana Tab, - select the pass in the analyzer sequence where you want the automatically - generated rules to be inserted.
In the Gram Tab, - right click and select Add > - Stub.
Give the stub concept a name - in the dialog box.
Click OK - to finish adding the stub concept.
|
- Note: - -
|
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Running_the_Rule_Generator.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Running_the_Rule_Generator.htm deleted file mode 100644 index 5083d19..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Running_the_Rule_Generator.htm +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - -
To run the rule generator:
- -From the Analyzer - menu, select Generate Rules.
Select All to - generate all rules as specified by samples in the Gram - Tab.
|
- Note: - The Dirty and Unlocked options are used - to generate rules for rule concepts that have the Dirty or Unlocked attribute - set. For more information on generating rules using Dirty or Unlocked, - see Generating - Rules. See - Setting Rule Generation - Properties for more information on other attributes. |
|
- WARNING: The edits - to automatically generated pass files will not be saved the next time - you try to regenerate the rules. The - only ways to permanently modify automatically generated files are (1) - to add or edit samples in the Gram Tab and regenerate the rules, (2) to - move or copy the files out of a stub region. |
-
- -
- - - - diff --git a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Setting_concept_properties.htm b/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Setting_concept_properties.htm deleted file mode 100644 index 91b681d..0000000 --- a/Help/helps/Using_VisualText/Automatically_Generating_Pass_Files/Setting_concept_properties.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - -
To set concept properties for rule - concepts:
- -In the Gram Tab, - select the rule concept.
Right click and select Properties - from the pulldown menu. The Gram Concept Properties dialog is opened.
Check or uncheck the boxes for the appropriate - attribute. (See Setting - Rule Generation Properties for a description of the attributes.)
Click Done - to finish setting the properties.
To inactivate a pass in the analyzer - sequence:
- -Select the pass - in the Ana Tab.
Right-click and select, Properties.
In the Pass Properties dialog, uncheck the Active box. The current pass number - is indicated in the From: To: windows.
Click OK - to finish inactivating the pass. The pass will show a break in the chain, - indicating that it has been inactivated.
|
- Note: - You can also inactivate other passes in the sequence at the same time. - Check the To End box to indicate - all passes from the current pass forward should be skipped. Check All to indicate ALL passes in the analyzer - sequence should be skipped. |
- - - - diff --git a/Help/helps/Using_VisualText/Importing_Databases_to_KB/Importing_Word_Lists_to_the_Dictionary_Hierarchy.htm b/Help/helps/Using_VisualText/Importing_Databases_to_KB/Importing_Word_Lists_to_the_Dictionary_Hierarchy.htm deleted file mode 100644 index 1a3074e..0000000 --- a/Help/helps/Using_VisualText/Importing_Databases_to_KB/Importing_Word_Lists_to_the_Dictionary_Hierarchy.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - -
The Knowledge Base comes with a specialized concept called dict - (for dictionary) which stores information about words.
- -There are several ways to incorporate a word list into the dict hierarchy. - One is - to create a simple analyzer to read in and add the list of words to the - hierarchy. You - can also add a pass to an existing analyzer project in order to add the - word list. The - pass can look like
- -@POST
- L("text") = strtolower(N("$text"));
- addword(L("text"));
-@RULES
-_xNIL <-
- _xALPHA
- @@
Note that you can copy a knowledge base folder to a minimal analyzer - having the pass above, run the analyzer on your word file, then Save KB. - Then you - can copy the KB folder back to your main analyzer. In - this way, knowledge bases can be conveniently moved around and modified - with data sources as they become available. Some - analyzers can thus be dedicated to building or augmenting knowledge bases. - (Things - are somewhat more complex with a compiled knowledge base. Mainly, - you want to modify the analyzer preferences to load the interpreted knowledge - base, when making upgrades as described here.)
- -- -
- -
- - - - diff --git a/Help/helps/Using_VisualText/ParseTrees/ViewingConceptTree.htm b/Help/helps/Using_VisualText/ParseTrees/ViewingConceptTree.htm deleted file mode 100644 index 51a38a2..0000000 --- a/Help/helps/Using_VisualText/ParseTrees/ViewingConceptTree.htm +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - -
Viewing Concept Trees
- -The concept tree shows you which nodes were built for a specific pass - in the analyzer sequence.
- -To view nodes created in a parse tree:
- -In the Ana Tab, right-click on a pass.
Select View - > Concept Tree.
|
- Note: - To view concept trees, you must run the analyzer with the Generate - Logs button on. |
- - -
|
- Tip:
- You can also view a concept tree by selecting the View Concept Tree button
- on the Debug Toolbar. |
Viewing Final Trees
- -You can view the final parse tree after all the passes in the analyzer - sequence have been executed.
- -To view the final parse tree:
- -In the Ana Tab, - right-click on a pass.
Select View - > Final Tree.
- - - - diff --git a/Help/helps/Using_VisualText/ParseTrees/ViewingIntermediateTrees.htm b/Help/helps/Using_VisualText/ParseTrees/ViewingIntermediateTrees.htm deleted file mode 100644 index 312287a..0000000 --- a/Help/helps/Using_VisualText/ParseTrees/ViewingIntermediateTrees.htm +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - -
Viewing Intermediate Trees
- -You can select a specific pass in the analyzer sequence and view the - cumulative parse tree for that pass. This is helpful when you want to - see how the each pass in the analyzer sequence is operating.
- -To view an intermediate parse tree:
- -In the Ana Tab, select the pass in the analyzer sequence.
Right-click and select View > Entire - Tree.
|
- Note: - To view intermediate parse trees, you must run the analyzer with the Generate Logs button on. |
|
- Tip:
- You can also select the pass and
- click on the View Parse Tree button in the Debug Toolbar. |
Viewing Parse Trees
- -There are several different ways to view parse trees of an analyzed - text.
- -To view a parse tree using the Ana - Tab Popup menu:
- -In - the Ana Tab, select a pass in the analyzer sequence.
Right - click and select View > Entire Tree.
To - view a parse tree using the Text File Popup menu:
- -Open the text file - in the Workspace.
Right-click - and select View > Parse - Tree.
- - -
|
- Note: - Running - the cursor over lines in the parse tree display will display the lines - in a tooltip box. Lines - which are too long to be displayed in full, are indicated with an ellipsis - mark (...). Clicking - on the tooltip with the left mouse button will display the entire truncated - text in a dialog box. To - clear the dialog box, click on the "x" in the upper right-hand - corner. |
- - -
|
- Tip:
- You can also view the parse tree of the selected pass
- by clicking on the View Parse Tree icon. |
- - - - diff --git a/Help/helps/Using_VisualText/ParseTrees/ViewingParseTreeMatches.htm b/Help/helps/Using_VisualText/ParseTrees/ViewingParseTreeMatches.htm deleted file mode 100644 index 0d0e9d4..0000000 --- a/Help/helps/Using_VisualText/ParseTrees/ViewingParseTreeMatches.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - -
Viewing Parse Tree Matches
- -You can select a specific pass in the analyzer sequence and view the - parse tree for that pass only.
- -To view a partial parse tree:
- -In the Ana Tab, select the pass in the analyzer sequence.
Right-click and select View > Tree - Matches
|
- Note: - To view the parse tree for a single pass, you must run the analyzer with - the Generate Logs button on. |
Viewing Partial Trees from Text Files
- -You can select a specific part of text in an analyzed file and view - the parse tree for that line of text only. This is helpful when you want - to see how the rule matcher worked on a particular part of text.
- -To view a partial parse tree:
- -In - the Text Tab, - double click on the processed text to open it in the Workspace.
Highlight - the text.
Right-click and select - View > Tree - of Selected. The parse tree for the highlighted text opens in the - Workspace.
You can run an analyzer on multiple files contained in a tree of folders.
- -To run an analyzer - on a tree of folders:
- -Select the top level folder - in the Text Tab.
Click on the Run
- button in the Workspace Toolbar. ![]()
|
- Note: - Log files generated for the text are placed under (indented and to the - right of) the text file. |
|
- Tips: - You can also select Run from the Analyzer - Menu. |
- - - - diff --git a/Help/helps/Using_VisualText/Running_Analyzers/Running_Analyzer_on_Single_File.htm b/Help/helps/Using_VisualText/Running_Analyzers/Running_Analyzer_on_Single_File.htm deleted file mode 100644 index 8f42ead..0000000 --- a/Help/helps/Using_VisualText/Running_Analyzers/Running_Analyzer_on_Single_File.htm +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - -
You can run the analyzer on files one at a time or you can run the analyzer - on multiple files contained in a tree of folders.
- -To run an analyzer on a single file:
- -Select - the file in the Text Tab.
Click
- the Run button on the Workspace
- Toolbar. ![]()
- -
To run an analyzer on a tree of folders:
- -Select the top level folder - in the Text Tab.
Click the Run
- button on the Workspace Toolbar. ![]()
|
- Note: - -
|
|
- Tip: - You can also select Run from the Analyzer - Menu. |
- -
- - - - diff --git a/Help/helps/Using_VisualText/Text_Files/About_Text_Files.htm b/Help/helps/Using_VisualText/Text_Files/About_Text_Files.htm deleted file mode 100644 index e5ff348..0000000 --- a/Help/helps/Using_VisualText/Text_Files/About_Text_Files.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - -
This "section" describes ways to manage text files, primarily - within the Text Tab.
- -Plain text files are usually suffixed with .txt, while HTML files are - suffixed with .htm or .html and are displayed with a globe icon in the - text tab.
- -When a text in the Text Tab has been analyzed, its icon gets a red check - mark. A - plus sign appears to its left, indicating that log files, dump files, - and output files can be viewed under it.
- -- - - - diff --git a/Help/helps/Using_VisualText/Text_Files/Adding_existing_text_files_to_a_project.htm b/Help/helps/Using_VisualText/Text_Files/Adding_existing_text_files_to_a_project.htm deleted file mode 100644 index 540cb17..0000000 --- a/Help/helps/Using_VisualText/Text_Files/Adding_existing_text_files_to_a_project.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - -
If you already have text files to be analyzed, you can add them directly - to the analyzer input directory for processing.
- -To add files to the analyzer project:
- -Using the file explorer, navigate to the location - of your text files.
Select the files - you want to add to the analyzer project.
Navigate to the input - folder of the analyzer project.
Copy the - files into the input folder.
To see the added files in the Text Tab, right-click - in the Text Tab and select Refresh.
- - - - diff --git a/Help/helps/Using_VisualText/Text_Files/Adding_new_text_files_to_a_project.htm b/Help/helps/Using_VisualText/Text_Files/Adding_new_text_files_to_a_project.htm deleted file mode 100644 index d6c9a1f..0000000 --- a/Help/helps/Using_VisualText/Text_Files/Adding_new_text_files_to_a_project.htm +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - -
There are several ways to add new text files to an analyzer project.
- -To add a text file using the Text Tab:
- -In your analyzer project, click on the Text - Tab.
With the mouse in the Text Tab, right-click and - select Add > New - Text File.
In the dialog box, give the text file a name. - You do not need to add the .txt extension to the file.
Click OK to finish creating the text file. The newly - created text file opens up in the Workspace. (The text file is stored - in the input - folder of the analyzer project.)
To add a text file using File > - New:
- -From the File - menu, select New. A blank text - file with a default VisualText title opens up in the Workspace. (You don't - have to be in the Text Tab.)
To save the text file in your analyzer project, - right-click on the text file and select Save - As. Navigate to the location - in the input - directory for the current analyzer project where you would like to save - the text file.
In the Save As - dialog, give the text file a name.
Click Save - to finish creating the text file.
To see the - file in the Text Tab, right-click in the Text Tab and select, Refresh.
You will be - prompted with a warning saying that refreshing the Text Tab will cause - all knowledge associated with the text files in the Text Tab to be lost. - Answer Yes - if you are not concerned with losing any information.
- - - - diff --git a/Help/helps/Using_VisualText/Text_Files/Deleting_text_files.htm b/Help/helps/Using_VisualText/Text_Files/Deleting_text_files.htm deleted file mode 100644 index 9ff9626..0000000 --- a/Help/helps/Using_VisualText/Text_Files/Deleting_text_files.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - -
To delete a text file from your project:
- -In the Text Tab, - right-click on the file you want - to delete and select Delete. Any - log files associated with the text file are also deleted.
|
- Tip: - Delete log files from the Text Tab to save space in your analyzer project. |
You can navigate among the different files in the Text Tab using the - Page Mode feature. This - feature allows you to move from one file to the next file and is handy - when you want to quickly get to the next file listed in the Text Tab. -
- -To move from one file to the next in the - Text Tab:
- -Double-click on a - file to open it in the Workspace.
Select the Page Mode Toggle
to
- activate the yellow Previous Text
and Next Text
arrows.
Use the Previous - Text and Next Text arrows to open up files in the Workspace.
|
- Note: - If a parse tree is displayed for the file, using the Previous Text and - Next Text arrows will display the parse tree display for the next text - in the list. |
- -
- - - - diff --git a/Help/helps/Using_VisualText/Text_Files/Opening_Text_Tab_Files.htm b/Help/helps/Using_VisualText/Text_Files/Opening_Text_Tab_Files.htm deleted file mode 100644 index dd47c55..0000000 --- a/Help/helps/Using_VisualText/Text_Files/Opening_Text_Tab_Files.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - -
To open a file in the Text Tab:
- -In the Text Tab, - double-click on the file. The - file opens in the Workspace. You - can also use the right-click menu in the Text Tab and select Edit/View - to open the file.
|
- Tip:
- If the file icon in the
- Text Tab is already highlighted, you can also click on the View Current
- Text button |
- - - - diff --git a/Help/helps/Using_VisualText/Working_with_Debugging_Tools/DumpFiles.htm b/Help/helps/Using_VisualText/Working_with_Debugging_Tools/DumpFiles.htm deleted file mode 100644 index 75d219c..0000000 --- a/Help/helps/Using_VisualText/Working_with_Debugging_Tools/DumpFiles.htm +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - -
Using Dump Files
- -To debug your analyzer it is often helpful to output information to - dump files. Dump - files are created by inserting a line of code in the desired pass file - indicating where to output the information.
- -To create a dump file:
- -In the Ana Tab, right-click on a pass file to open - it in the Workspace.
In the pass file, add a printing statement using - the "<<" operator in the following form: "dump_file_name.txt" - << content_to_print. Below - is a rule from the corporate analyzer that dumps the matched rule text - into a dump file called "anaphora":
![]()
To view a dump file:
- -On the Debug
- Toolbar, click on the arrow next to the View
- Dump Files
icon.
Select - a dump file from the pulldown - menu.
- - -
|
- Note: -
|
Using Page Mode
- -Page Mode allows you to automatically browse multiple windows simultaneously. - For example, if you've run the analyzer on a folder, you can then open - a window for the input file and output file, then browse among all the - input-output pairs using the left and right arrows on the Workspace Toolbar. - If a parse tree view is open, you can also browse the parse tree for each - pass of a single text analysis.
- -To browse between multiple files in - an input folder:
- -Select
- the Toggle Page Mode button
on the Debug Toolbar. This
- activates the yellow Previous Text and Next Text buttons.
Open - a file from an input directory.
Select - the yellow Next Text button to - view the next file in the input directory. Select - the Previous Text button to view - the last file.
To - update parse tree displays for passes in the analyzer sequence:
- -Select - the Toggle Generate Logs button - and run the analyzer.
Click - on the View Parse Tree button - to display the parse tree.
Select - the Toggle Page Mode button.
In - the Ana Tab, click on a pass to update the parse tree display - in the Workspace.
- - - - diff --git a/Help/helps/Using_VisualText/Working_with_Debugging_Tools/Using_highlighting.htm b/Help/helps/Using_VisualText/Working_with_Debugging_Tools/Using_highlighting.htm deleted file mode 100644 index 1e80f4c..0000000 --- a/Help/helps/Using_VisualText/Working_with_Debugging_Tools/Using_highlighting.htm +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - -
You can highlight regions of text in an analyzed file that match rules - in a selected pass of the analyzer sequence using Highlight Mode. To use - this highlighting feature, you must run the analyzer with Toggle Generate - Log button selected.
- -To highlight regions in a text matching - a pass:
- -Select the Toggle
- Generate Log button.
- ![]()
In the Text Tab, - double click on a text file to - open it in the Workspace.
Run the analyzer.
In the Ana Tab, - select a pass.
Select the Toggle
- Highlight Mode button.
The text matching the pass
- is highlighted in the text file. If a node has been created, the highlighting
- is blue. If a node has matched, the highlighting is green.
|
- Note: - You can also highlight text in a file that match selected rule concepts - in the Gram Tab. To do this select the rule concept in the Gram Tab. |
- -
- - - - diff --git a/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Opening_the_Phrase_Tool.htm b/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Opening_the_Phrase_Tool.htm deleted file mode 100644 index 693305a..0000000 --- a/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Opening_the_Phrase_Tool.htm +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - -
The Phrase Tool allows you to view the phrase of a concept in the Knowledge - Base. You - can delete, add or edit nodes and their attributes using the Phrase Tool. - Concepts - in the Knowledge Base with phrases are indicated by a yellow icon in the - Knowledge Base hierarchy.
- -To view the phrase for a concept in the Knowledge - Base:
- -In the KB
- Editor, navigate to the concept
- in the hierarchy with a yellow icon. ![]()
Right-click on the - icon and select Phrase - Tool. The - Phrase Tool opens up in the Workspace.
To delete a node from a phrase:
- -Select the node - in the list of nodes displayed in the Phrase Tool.
Click the Delete - button.
At the confirmation prompt, answer Yes.
To add a node to a phrase:
- -In the Phrase Tool, click the Add - button.
In the dialog box, enter a name - for the node and click OK. The - new node is added to the phrase.
To add attributes to a node:
- -Select the node - in the list of nodes displayed in the Phrase Tool.
Click on the Attributes - button. The - Attribute Editor is launched.
To add an attribute to node, click Add - Attribute. In - the Name column, provide a name - and hit the return key. At - this time you can provide a value - for the name.
To change the order of the nodes in - the phrase tool:
- -Select the node - in the list of nodes.
Use the blue - arrow buttons to move the node to the desired location.
- -
- -
- -
- - - - diff --git a/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Using_the_KB_Editor.htm b/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Using_the_KB_Editor.htm deleted file mode 100644 index 7847e0f..0000000 --- a/Help/helps/Using_VisualText/Working_with_Knowledge_Base/Using_the_KB_Editor.htm +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - -
The KB Editor displays the hierarchy of concepts in the Knowledge Base. - You can - edit the Knowledge Base using NLP++ Functions or using the KB Editor. -
- -To open the KB Editor:
- -Select the KB
- Editor button
on the Workspace Toolbar. The
- Knowledge Base opens up in the Workspace.
|
- Tip: - You can also access - the KB Editor from the KB Menu. |
To move a concept in the Knowledge - Base hierarchy:
- -Select the concept - you want to move.
Using
- the Move Concept Up
and Move Concept Down
button on the Workspace toolbar, move the concept in the
- hierarchy.
|
- Tip: - You can also move - concepts using the Move Concept Up or Move Concept Down options in the - KB Menu. |
- -
- - -
|
- Note: - -
|
To edit the attributes of a concept - in the KB:
- -Select a concept - in the KB.
Right-click and select Attributes - from the menu. This - will bring up the Attribute Editor. See - Attribute - Editor Description for details on the Attribute Editor buttons.
You can edit the attributes of a concept or node in the Knowledge Base - using the Attribute Editor. The - Attribute Editor is particularly handy when creating or working with a - lexicon as you can edit lexical items directly.
- -To access the Attribute Editor:
- -From the KB Menu, select Attribute - Editor.
|
- Note: - You can also access the Attribute Editor from the following: -
|
See Attribute - Editor Description for details on the Attribute Editor buttons.
- -- - - - diff --git a/Help/helps/Using_the_KB_Editor.htm b/Help/helps/Using_the_KB_Editor.htm deleted file mode 100644 index 5f2c028..0000000 --- a/Help/helps/Using_the_KB_Editor.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - -
- -
- - - - diff --git a/Help/helps/VB_to_VT.htm b/Help/helps/VB_to_VT.htm deleted file mode 100644 index 8a75bb1..0000000 --- a/Help/helps/VB_to_VT.htm +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - -
A Visual Basic .NET driver program that demonstrates how to call a VisualText - analyzer. It - uses the new VTAPI_VB.dll library built to provide a simple programmer's - API to VisualText. The - main code file is repeated here for convenience. All - the API functions are invoked in this sample.
- -'''''''''''''''''''''''''''''''''''''
-'VB_TO_VT = Driver to call a VisualText analyzer from a Visual Basic program.
-'ASSUMES:
-' Global
- environment variable APPS = d:\apps
-' Minanalyzer
- available in d:\apps. (Copy
- from c:\Program Files\TextAI\VisualText\apps)
-'''''''''''''''''''''''''''''''''''''
Module Module1
- - Private
- Declare Function makeVTRUN_VB Lib
- "VTAPI_VB.dll" () As Integer
- Private
- Declare Function makeNLP_VB Lib "VTAPI_VB.dll"
- (ByVal ana As String, ByVal vtrun As Integer) As Integer
- Private
- Declare Function cleanup_VB Lib "VTAPI_VB.dll"
- (ByVal nlp As Integer, ByVal vtrun As Integer) As Integer
- Private
- Declare Function setbatchstart_VB
- Lib "VTAPI_VB.dll" (ByVal flag As Boolean, ByVal nlp As Integer)
- As Integer
- Private
- Declare Function analyzeFile_VB Lib
- "VTAPI_VB.dll" (ByVal inf As String, ByVal ob As String, ByVal
- osiz As Integer, ByVal datum As String, ByVal compiled As Boolean, ByVal
- nlp As Integer) As Integer
- Private
- Declare Function analyzeBuffer_VB
- Lib "VTAPI_VB.dll" (ByVal ib As String, ByVal ob As String,
- ByVal osiz As Integer, ByVal datum As String, ByVal compiled As Boolean,
- ByVal nlp As Integer) As Integer
Sub - Main()
- - 'NAME
- OF ANALYZER
- Dim
- analyzerName As String = "minanalyzer"
'RUNTIME
- ENVIRONMENT HANDLES.
- Dim
- vtrun As Integer = 0
- Dim
- nlp As Integer = 0
'SET
- UP PARAMETERS FOR ANALYZER.
- Dim
- infile As String = "D:\apps\minanalyzer\input\misc\xyz.txt"
- Dim
- inbuf As String = "This is an input buffer"
- Dim
- outsiz As Integer = 512
- Dim
- outbuf As String = Space(outsiz)
- Dim
- datum As String = "Parameters to pass to analyzer"
'Todo:
- After you compile the analyzer in VisualText, you can turn on this flag.
- Dim
- compiled As Boolean = False
'INITIALIZE
- VISUALTEXT RUNTIME SYSTEM (Onetime call)
- '(Handles
- multiple analyzers)
- vtrun
- = makeVTRUN_VB()
'INITIALIZE
- CURRENT ANALYZER RUNTIME (Onetime call)
- nlp
- = makeNLP_VB(analyzerName, vtrun)
'''''''''''''''''''''''''''''''''''''''''''''''''
- 'Analyzer
- calls below can be placed into a loop.
- '''''''''''''''''''''''''''''''''''''''''''''''''
'Inform analyzer
- of first file in a batch.
- 'Note:
- Analyzer automatically resets flag to false.
- setbatchstart_VB(True,
- nlp)
'RUN ANALYZER ON
- FILE.
- analyzeFile_VB(infile,
- outbuf, outsiz, datum, compiled, nlp)
- Console.WriteLine("outbuf:
- " & Trim(outbuf))
'RUN
- ANALYZER ON BUFFER.
- analyzeBuffer_VB(inbuf,
- outbuf, outsiz, datum, compiled, nlp)
- Console.WriteLine("outbuf:
- " & Trim(outbuf))
'''''''''''''''''''''''''''''''''''''''''''''''''
- 'CLEAN/DELETE
- THE RUNTIME ENVIRONMENT (Onetime call)
- cleanup_VB(nlp,
- vtrun)
End
- Sub
-End Module
- - - - diff --git a/Help/helps/VisualText_Basics/About_Automated_Rule_Generation.htm b/Help/helps/VisualText_Basics/About_Automated_Rule_Generation.htm deleted file mode 100644 index 2c075d3..0000000 --- a/Help/helps/VisualText_Basics/About_Automated_Rule_Generation.htm +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - -
VisualText allows you to enhance text analyzers by merely highlighting - and categorizing samples from text. Automated rule generation (or RUG, for short) creates passes and rules - for you automatically, so that you don't have to worry about the details - of rule writing. It also makes analyzers much more maintainable, because - when you modify an analyzer and then invoke RUG, it automatically - updates rules according to changes made earlier on in the analyzer. That - is, the developer doesn't need to worry that changes to rules in one pass - will invalidate dependent rules in subsequent passes.
- -RUG is best used for word and phrase-level constructs that are modular - and well defined, e.g., telephone numbers. More generally, RUG can be - used for the things that an analyzer deals with explicitly. For example, - a linguistically sophisticated analyzer that identifies the components - of sentences (noun phrases, verb phrases, etc.) can exploit RUG to identify - clausal and sentential patterns.
- -RUG is less useful for completely open ended or nonproductive constructs. - For example, RUG might not be very useful for storing and identifying - many instances of full names, such as "John Smith."
- -As you develop your text analyzer, you will learn how best to organize - the samples that you want to collect within the Gram Tab.
- -A caveat in using RUG is that sometimes rules will not be as general - as you want, or they may be more general than you want. The Gram - Concept Properties dialog can be used to help control some of these - behaviors. Updates to this Help documentation will help detail some settings, - but experimentation may also be required.
- -The Gram Tab - is where you set up concepts and samples for the automated rule generation - process.
- -VisualText automatically generates rules by taking samples you provide, - making generalizations from the samples, and then creating the rules. - An outline of the process of automatic rule generation is given below. - Each - step is detailed in the Automatically Generating Pass Files section.
- -Create a stub, (e.g., - called phrases).
- -Select a pass in the Ana Tab at the location where you want a set - of automatically generated passes to be placed. Then, either add a stub concept in the Gram Tab or a stub region in the Ana Tab, since adding - one always adds the other automatically. The stub concept is the primary - organizer of user-highlighted samples. The stub region is reserved for - the automatically generated passes and rules. When RUG is invoked, it - automatically inserts or overwrites passes within the stub regions.
- -We recommend that the ordering of stub concepts (in the Gram Tab) - and their corresponding stub regions (in the Ana Tab) be kept in tandem, - for clarity.
-Create a folder concept, another level of organizing user samples - (e.g., contact information).
- -Folder concepts organize multiple types of samples.
-Create a rule concept, which - represents a set of closely related samples (e.g., telephone number).
- -Rule concepts "own" a set of related samples.
-Create a label concept, - which represents a set of subsamples (e.g., area code).
- -Label concepts "own" a set of related subsamples. Label - concepts and subsamples are optional. For example, if you don't care about - subdividing a telephone number, then you need not create a label concept - for the area code.
-Select a concept in the - Gram Tab (under which you want to add text samples).
- -This will dynamically create a menu of rule and label concepts, - with which the user may categorize samples.
-Highlight a sample within - a text file in the workspace.
- -Use the Text Tab to find and open a text file, then highlight a - text sample within it.
-Right-click and select a rule or label concept.
- -For example, if a full telephone number sample is highlighted, select - the rule concept for telephone numbers. If you highlight a part of the - full sample, such as an area code, then select the label concept for area - codes.
-Invoke RUG.
- -When done adding samples and subsamples, from the Main Menu select - Analyzer > Generate Rules > All. RUG will create new passes, as - appropriate, in the stub regions of the Ana Tab. (You could also use the - Generate button, but we recommend that Generate Rules > All be used - as far as possible.)
- --
Adding - Samples to Rule Concepts
- - - - - - - -- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Basics/About_KB_Command_Files.htm b/Help/helps/VisualText_Basics/About_KB_Command_Files.htm deleted file mode 100644 index c5a7fed..0000000 --- a/Help/helps/VisualText_Basics/About_KB_Command_Files.htm +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - - -
On examining the interpreted knowledge base in the kb\user folder of - an analyzer project, you will find files with human-readable commands:
- - -|
- main.kb |
-
- Invokes command files for loading the knowledge base. |
|
- hier.kb |
-
- Adds the concepts in the knowledge base hierarchy |
|
- word.kb |
-
- Adds the words in the dictionary |
|
- phr.kb |
-
- Adds phrases to concepts |
|
- attr#.kb |
-
- Adds attributes to concepts and phrase nodes |
- -
When an interpreted KB is read as part of loading an analyzer, the commands - in these four files are executed in the order given above. (This - ordering guarantees that concepts are added to the kb before they are - used in phrases, and that all concepts and nodes are present before attaching - attributes to them.) Similarly, - the gui.kb file at the top-level directory of an analyzer project defines - the analyzer sequence and the input file hierarchy, as loaded into the - knowledge base.
- -All these .kb files execute a batch command language for adding and - editing the knowledge base. A - typical command looks like
- -add hier "concept" "sys"
- -add hier <path> specifies - that a concept is to be added to the hierarchy, as specified by a path - of concept names that starts at the root of the knowledge base hierarchy, - called "concept." Thus, - the command above says to start at the root, named "concept," - and to add a concept called "sys" under the root, if not already - present. Another - example is
- -add word "xyz"
- -The add word command above adds - the word "xyz" under its appropriate index-concept in the special - dictionary hierarchy within the KB.
- -The command ind phrase is used - to add a phrase of nodes to a concept. Each - concept can only have one phrase, with any number of nodes:
- -ind - phrase
- -<concept> ; - The concept to which the phrase is being added.
- -<concept 1> ; - Concept referenced by 1st node of phrase.
- -<concept - 2> ; - Concept referenced by 2nd node of phrase.
- -...
- -end ind
- -An example that adds an attribute to a concept is
- -ind - attr
- -"concept" - "gram"
- -0
- -"concept" - "sys" "dict" "a" "c" "co" - "constrain"
- -pst
- -"true"
- -end - ind
- -The command ind attr is a multi-line - command for adding an attribute. Its - general form is
- -ind attr
- -<concept> ; - The concept to which an attribute is being added.
- -<concept index> - ; - 0 means attr is to be added to the concept itself. 1 - = add attr to 1st
- -; - node of concept's phrase, etc.
- -<key concept> - ; - The attribute key (or name), specified by a concept in the kb.
- -<value type> - ; - The type of value:
- -; - (pst = string, pnum = integer, pfloat = float pcon = concept)
- -<value> ; - The value itself, according to its type.
- -...
- -<value type N> - ; - Can optionally add second value type, second value, and so on.
- -<value N>
- -end ind
- -- -
Each command file should - end with the quit command alone - on a line. Comments - are indicated by a semicolon, as above.
- -- -
Note that command files - can be executed from an analyzer pass file, using the NLP++ take - function (also available as an API function in include/API/consh/cg.h). - take(filename) - executes the commands in the specified .kb file. This - is one way in which knowledge can be layered or imported into a knowledge - base conveniently. In - addition, there's a take command, - as in
- -- -
take "kb\\user\\main.kb"
- -- -
which accepts both an absolute - and relative filename as argument, and executes the commands within the - given filename. Relative - filenames assume the current application project as the root directory.
- -- -
A variant to add attributes - to a dictionary word concept has been implemented, called ind - wattr. Its - format is identical with ind attr, except that instead of a concept, a - word may be specified for convenience.
- -- -
ind - wattr
- -<word> ; - A string. The - dictionary word to which an attribute is being added.
- -0 ; - This line is kept merely to match the format of ind attr.
- -<key concept> - ; - The attribute key (or name), specified by a concept in the kb.
- -<value type> - ; - The type of value:
- -; - (pst = string, pnum = integer, pfloat = float pcon = concept)
- -<value> ; - The value itself, according to its type.
- -...
- -<value type N> - ; - Can optionally add second value type, second value, and so on.
- -<value N>
- -end ind
- -- -
- -
Additional batch commands - exist, but the most important ones have been mentioned here.
- -- - - - diff --git a/Help/helps/VisualText_Basics/About_Parse_Trees.htm b/Help/helps/VisualText_Basics/About_Parse_Trees.htm deleted file mode 100644 index 61e499f..0000000 --- a/Help/helps/VisualText_Basics/About_Parse_Trees.htm +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - -
VisualText analyzers build and use a single parse - tree (or tree, for short) - which is a data structure that tracks the patterns that have matched within - the input text. Building parse trees is similar to the sentence diagramming - taught in elementary school. The first pass of every analyzer tokenizes - the text, that is, it converts a stream of characters to a parse tree - in which alphabetic, numeric, whitespace, and punctuation are grouped - into units called nodes. Below - is a tokenized parse tree as displayed in the Parse Tree View.
- -- -

- -
Each line in the display above corresponds to one node of the parse - tree. The root, or top-level node - of the parse tree, is named _ROOT and appears at the top of the display. - The remaining nodes are children - of the root, and the root is their parent. - Generations, or levels, of nodes - in the parse tree are indicated by indentation. The phrase - or list of children are all in - a sibling relationship to each - other. In general, a parse tree has more levels than shown above. We speak - of ancestors and descendants to describe the relationships between nodes - at different levels of the parse tree.
- -A token, literal, - leaf, or terminal - node, represents a literal text. Tokens are drawn with red dashes, as - above. A nonterminal (or abstract) node is one with descendants. - We say that a nonterminal node dominates - its descendant nodes. Nonterminal nodes are drawn with a grey pentagon. - The root node is the only nonterminal in the above tree. When selected, - a node's color changes to blue.
- -A terminal node is a token and represents words, numbers, whitespace,
- and punctuation. The format for terminal nodes is as follows:
-
-nodename::(node_type info1 info2.. ("var1" "val")...)
- text-associated-with-node
The node type identifies the type of token. It is one of alpha - (for alphabetic), num (for number), - white (for whitespace), or punct (for punctuation). Information - about the node follows the node type. Flag settings such as unsealed - (or un), built, - and fired may be shown in abbreviated - form. Variables and values attached to the node may be displayed on the - node line as well. Each variable and value-list is a parenthesized list - of the form ("varname" "value1" "value2" - ... ).
- -A nonterminal node is a node with descendants. An underscore is normally - the first character in the name of a nonterminal. The format for nonterminal - nodes in the parse tree is as follows:
- -_nodename::(node info1 info2) text-associated-with-node
- -For example, a non-terminal node _company - created when the rule matcher encountered the company name "Text - Analysis International" in a text might look like:
- -_company::(node un) Text Analysis International
- -The information following the node type is as described for terminal - nodes above.
- -You can distinguish between terminal and nonterminal nodes by the symbols - used in the parse tree display.
- -
denotes a nonterminal node, and
denotes a terminal node.
When a node is selected in a parse tree view, the icon for the selected - node turns blue. A nonterminal is blue when selected and grey otherwise. - A terminal is blue when selected and red otherwise. You can collapse and - expand nodes by clicking on the + and - symbols.
- -The final parse tree is the - tree produced by fully analyzing a text with a text analyzer.
- -VisualText enables you to view the parse tree - after each pass has executed. Each such intermediate - parse tree records the patterns found in the input text by the - analyzer passes up to and including the current pass.
- -The concept tree is a parse - tree that contains only nodes that have been built for the selected pass - in the analyzer sequence. The - concept tree view lets you quickly check which nodes were created in order - to step through your analyzer.
- - - - diff --git a/Help/helps/VisualText_Basics/About_the_Knowledge_Base.htm b/Help/helps/VisualText_Basics/About_the_Knowledge_Base.htm deleted file mode 100644 index 4f409e9..0000000 --- a/Help/helps/VisualText_Basics/About_the_Knowledge_Base.htm +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -The Knowledge Base Management System - (KBMS) used in VisualText™ is - based on a knowledge representation framework developed by Text Analysis - International, called Conceptual Grammar™ (CG). - CG represents knowledge in terms of concepts, phrases, and their attributes. - Everything "hangs" off a hierarchy of concepts. Because CG can - represent concepts, phrases, attributes, and their interrelationships, - it allows diverse types of knowledge to be stored flexibly within a single - framework. See also the Introduction - to the Knowledge Base.
- -The KB - Editor and the Attribute - Editor can be used to manipulate portions of the KB.
- -The KB is stored under an application's - kb folder. For example, for the tutorials, the folder
- -C:\apps\myAnalyzerFolder\myAnalyzer\kb
- -has a folder called user. - The user - folder stores data specific to the analyzer in question. The KB for an - analyzer is defined by the four files in the kb\user folder: attr.kb, - hier.kb, - phr.kb - and word.kb.
- -The KB consists of a hierarchy of concepts. - Attributes can be associated with - each concept . An attribute consists of a key - (or slot, or name) - and zero or more values. A value - can be a string, an integer, or another concept. Each attribute can have - multiple values, each with a distinct type. (Note - that a value, or val, - is a type of knowledge base object.)
- -A concept can also have an associated phrase - of nodes. A node is similar to - a concept in most respects, except that a node is not placed directly - in the knowledge base hierarchy. Rather, nodes serve as "proxies" - or references to concepts that reside in the hierarchy. Phrases can be - used to implement idioms, patterns, samples, rules -- in short, any sequential - information.
- -Advanced Notes: An - attribute key itself is actually a concept, rather than a string, so that - multiple attributes with the same "name" can coexist peacefully - within the same concept. To add further flexibility (or complexity, depending - on your view), multiple attributes with identical keys can reside within - a single concept. For many applications, referring to attribute keys by - name is just fine, so most of the implemented NLP++ functions that you'll - encounter refer to attributes by name.
- -See the Table of - KB Functions and page-per-function in the Knowledge Base Functions - section.
- -The knowledge base can be changed manually by using the KB Editor. Analyzers - can also be programmed to update the knowledge base automatically, for - example to accumulate information across a set of documents.
- -Some analyzers are geared to load up a relatively empty knowledge base - and then populate it temporarily. Some - analyzers are built primarily to grow a large knowledge base. When - exiting VisualText, the user is asked to save the changes to the knowledge - base or discard them. Unless - your purpose is specifically to build or modify a knowledge base, then - you can opt not to save the modified knowledge base. Some - distinctions to be aware of:
- -Save KB - Saves the knowledge base into command files.
-Compile KB - Saves the knowledge base into a file system.
-Load interpreted KB - read kb command files into the knowledge base on
- loading an analyzer.
-Load compiled KB - load or use the compiled kb file or file system.
With the 2.1.0.0 version and later, VisualTextQ - provides a knowledge base manager based on the QDBM freeware. This - supports growing very large knowledge bases in VisualText, by virtue of - replacing the old kb.dll file with the QDBM file system. With - this variant, loading the interpreted version reads the knowledge base - command files into the QDBM database. Saving - the knowledge base writes out command files, as before. Compiling - the knowledge base saves off a copy of the QDBM database.
- -Loading the compiled knowledge base copies - the QDBM database to a temporary folder (kb\tmp) for use in the current - session. If - the session is closed without saving the kb, then the changes made in - the tmp area are discarded. If - the kb is "compiled", then the tmp area is merely copied to - the permanent store (kb\qdbm).
- -In this way, the same knowledge base management - commands work as before, but under the hood the QDBM system replaces the - kb.dll file for the compiled version of the knowledge base. As - always, BEFORE UPGRADING to the new VisualText version, it is important - to save any knowledge base that is important -- this will create command - files that will automatically load in any newer version of VisualText. - For questions - about kb management, please contact our support.
- - - - diff --git a/Help/helps/VisualText_Basics/About_the_analyzer_sequence.htm b/Help/helps/VisualText_Basics/About_the_analyzer_sequence.htm deleted file mode 100644 index 848e19a..0000000 --- a/Help/helps/VisualText_Basics/About_the_analyzer_sequence.htm +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - -The analyzer sequence is a series of steps or passes, - each containing its own pass algorithm. As the analyzer is run over the - text, each pass is taken in the order it occurs in the sequence and executes - the code and rules that are contained in it. The Ana - Tab manages the analyzer sequence.
- -Analyzer passes use and modify a common data structure, called a parse tree. They - may also post and use shared information in the knowledge base. VisualText - analyzers can be very fast because they build a single - parse tree per text.
- -There are two types of passes in the analyzer sequence: system - or built-in passes and user passes. - The first pass in the analyzer sequence is tokenize - by default, which is a system pass that converts the input text to a parse - tree. The tokenize pass, like all system passes, cannot be modified.
- -User passes employ either the pattern - (or pat) and the recursive - (or rec) algorithm. Both - employ a pass file, in which the - user places NLP++ code and rules.
- -NOTE: - VisualText does not provide a way to add system passes to the analyzer - sequence. You - can do this manually by exiting VisualText and editing the analyzer.seq - file in the project's spec folder. - VisualText - 2.5.x.x and onward provides a new tokenize pass called dicttok - that uses a knowledge base to automatically put part-of-speech information - on the parse tree. (Grab the three kb.* files from bin - folder of TAIParse, available at our website, and put them in a new analyzer - project's bin folder).
- -If you need a customized tokenization pass to - handle OCR output (already exists, commercially available in conjunction - with http://www.XIEO.info)), convert HTML to plain text, or another specialized - input format, TAI can help. Contact - us at support@textanalysis.com, 1-877-235-6259 USA toll free.
- -dicttok also puts a CTRL - attribute on control characters to help manage control characters (e.g., - using feature-based matching), as in the code snippet below.
- -@PRE
-<2,2> vareq("CTRL",128);
- #
- Match ASCII 128 = €
-@POST
-"output.txt" << "Found
- ctrl = " << N("$text",2) << "\n";
-@RULES
-_xNIL <-
-â
-_xCTRL
-_xALPHA
-@@
will match the character (€) in the following text and output it.
- -“small
- -- -
Since each pass in the analyzer typically builds upon the last one (via - a common parse tree), careful attention should be given to the ordering - of each pass in the sequence. When a pass creates a structure that is - used by later passes, the pass is said to be feeding them. If it removes or hides - information from successive passes, it is said to be bleeding. - One nice feature of VisualText is that you can create an analyzer sequence, - see how it works and easily change the sequence around to suit your needs. - Since the ordering of rules within - a pass file can also create, hide or destroy parse tree structure available - for later rules and passes, careful attention should also be given to - the ordering of rules within the pass file.
- -Pattern - The pattern algorithm - is the workhorse pattern-matching algorithm type used in VisualText. For - each node in the currently selected phrase, each rule within the pass - file is tried in turn. When a rule has matched, the pattern algorithm - executes its associated code and actions, then moves onto the node following - those that matched the current rule. (Notes: [1] when rules have a trigger, - they are only tried if the triggered rule element will successfully match. - [2] The next node to be tried after a rule match may be selected using - the lookahead element action.)
- -Recursive - The recursive algorithm - type implements a standard recursive-grammar algorithm. The nodes of the - current phrase are in effect traversed repeatedly, as long as a rule in - the current pass file matches. When no rules match in a phrase, then the - next phrase in the parse tree is selected, till no more phrases remain - to select. (Notes: [1] noop rule - matches are counted as failures - by the Recursive algorithm, so that they won't cause an infinite loop.)
- -There are several ways to add passes to the analyzer sequence. One way - is to create or add the pass yourself and the other way is to have VisualText - create the pass for you. An analyzer will generally contain both types - of passes.
- -To create the pass yourself, you write NLP++ code and rules in the pass - file used by the pass. It is also possible to add an existing pass file - from another analyzer directly into your project. When you add your own - passes, you use the Ana Tab. For more information on adding passes to - the analyzer sequence yourself, see Adding - Pass Files.
- -When VisualText automatically creates a pass, it takes samples that - you provide, makes generalizations from those samples and then creates - the passes and the associated pass files. The automatically created passes - are placed in a stub region. The - process of adding samples is called sampling. - Automatically generated passes can be edited, but any edits will be lost - the next time the automatic rule generation (RUG) is invoked. To make - changes, you will have to go through the sampling process again. The Gram - Tab is used for sampling. For more information on the automatic rule generation, - see About Automatic Rule - Generation.
- -As you add new passes to the Ana Tab, they become part of the stepwise - sequence executed when the text analyzer runs on an input text. It is - possible to have the analyzer skip - a pass in the analyzer sequence by setting the pass properties for the - pass. When you inactivate a pass, you tell the analyzer to ignore the - code and rules included in the pass file associated with the pass. Skipping - passes can be used as a tool to debug your analyzer. For more information, - see Inactivating - Passes.
- -
A DNA link denotes a user
- pass (if recursive, includes a letter R). Inactivated passes are indicated
- by a break in the chain.
A red bead denotes a stub region start or end. A stub region
- holds automatically generated passes.
A vertical bar denotes a system pass (e.g., tokenize).
This section is concerned with configuring and using text analyzers - outside the VisualText™ environment. It covers:
- -Standalone analyzer
Command-line arguments - for an analyzer
Analyzer and knowledge - base APIs
Compiling the analyzer
Compiling the knowledge - base
We assume that an analyzer has been built using VisualText, and that - Microsoft Visual C++ is available to the developer.
- -Linux and Gnu C++. - Analyzers - built with VisualText can be configured to run on Linux with Gnu C++. - TAI periodically - upgrades the port to the VisualText runtime libraries. The - libraries are not currently bundled with the VisualText release, and you - may inquire about them by contacting us at info@textanalysis.com .
- -The interpreted text analyzer - constructed with VisualText consists partly of the definition files within - the application's spec folder. - The spec folder contains the analyzer sequence file (analyzer.seq) - that defines the order of text-analysis passes, as well as the pass files - (.pat files) that specify the - rules and code to be executed at each pass. The analyzer engine and knowledge - base management system (KBMS) are implemented as DLLs that execute the - interpreted knowledge within the spec folder and within the kb - folder, respectively. In addition, the app's user - project is available for adding new NLP++ functionality to the core functions - provided with VisualText.
- -When the user compiles the analyzer, C++ code is generated, placed in - the app's run folder, and compiled - using MS Visual C++. When the user compiles the knowledge base, the app's - kb folder is similarly updated.
- -C++ code files are also provided for a default standalone analyzer. - The user creates an empty project and adds the C++ files at the application's - top level folder (main.cpp and - so on). The default standalone analyzer exemplifies the way in which a - VisualText application can be embedded in larger programs.
- -The following sections provide further details about these topics.
- -Analyzer templates (such as Bare) come with prebuilt Microsoft Visual - C++ project files prog.dsw and - prog.dsp, which contain most of - the project settings described below. You - should be able to just modify the line in main.cpp and compile this project - to have a standalone version of your analyzer.
- -Instructions for creating and running the standalone analyzer:
- -1. Make sure that your app folder (e.g., C:\apps\chatter) has the latest - versions of the code files, by comparing with the files in the directory - VisualText\Templates\Bare. The files include main.cpp, Uanalyze.cpp, Uanalyze.h, - and possibly others.
- -2. Use MS Visual C++ to create a standalone application in the app folder - (e.g., an empty Win32 Console Application). Use the name of the app folder - to name the project and create the project within the app folder.
- -3. Add the code files in the app folder to the project.
- -4. Edit the Project
- Settings:
-
-In Project Settings > C/C++ tab >
- Category: Preprocessor > Additional include directories: add
- the filler $(VISUALTEXT)\include\Api
In Project - Settings > C/C++ tab > Category: Code Generation > Use run-time - library: select
- -(in - Release config) Multithreaded
- -(in - Debug config) Debug - Multithreaded
- -In Project - Settings > C/C++ tab > Category: General > Debug info: - select
- -(in - Release config) None
- -(in - Debug config) Program - Database
- -- -
In Project - Settings > Link tab > Category: Input > Additional library path: - add the filler $(VISUALTEXT)\lib
- -In Project
- Settings > Link tab > Object/library modules: append the
- text
- (in release config:) libconsh.lib
- lite.lib libprim.lib
(if - available: in debug config:) libconshd.lib - lited.lib libprimd.lib
- -- -
In Project - Settings > Debug tab: you may want to set up an input text file - to process for testing purposes.
- -5. In main.cpp, edit the name of the application. e.g., appname - = "chatter"; This - name must conform to the name of the top-level folder of the analyzer - project.
- -6. Build the program in the standard - fashion within the MS Visual C++ environment.
- -Invoking a standalone analyzer (built as above) looks like
- -analyzer-executable [/INTERP][/COMPILED][/IN - infile] [/OUT outfile] - [/DEV] [infile [outfile]]
- -The various arguments are
- - -|
- ARGUMENT |
-
- DESCRIPTION |
|
- /INTERP |
-
- Run the interpreted analyzer (this is the default). |
|
- /COMPILED |
-
- Run the compiled analyzer (run.dll). |
|
- /IN infile |
-
- Specify the input file to be analyzed |
|
- /OUT outfile |
-
- Specify the output file [SEE NOTES] |
|
- /DEV |
-
- Developer's verbose mode (e.g., output intermediate logs). |
|
- [infile [outfile]] |
-
- Unmarked args are input file followed by output file. |
|
-
|
-
-
|
The code files in the top level folder of an analyzer project demonstrate - API calls to load and run the analyzer and knowledge base. The - API header files are located by default in
- -C:\Program Files\TextAI\VisualText\include\API
- -and its subfolders. The - main API header files are
- -API\lite\nlp.h, which specifies - function calls for creating an NLP object to manage an analyzer and run - it on input text files or buffers, and
- -API\consh\cg.h, which specifies - function calls for creating a CG object to manage, access, and modify - the knowledge base.
- -The header documentation in nlp.h is repeated here for reference.
- -THE MAIN API FUNCTIONS - ARE:
- -- -
NLP = - Create the NLP object to manage analyzer.
- -make_analyzer = - Create and load a text analyzer.
- -- -
API CALLS FOR NORMAL - RUNNING OF ANALYZER ON A TEXT:
- -- -
analyze = - Run analyzer on a single text.
- -- -
API CALLS FOR STEPPING - THROUGH ONE PASS AT A TIME:
- -- -
apiInitAnalyzer = - Initialize stepwise interp analysis of a text.
- -apiStepAnalyzer = - Execute next pass in the analysis of a text.
- -apiCleanAnalyzer = - Clean up stepwise analysis of a text.
- -- -
- -
We describe the call to analyze(), which is the main function that you'll - call outside VisualText to analyze a text. Note - that an example of the use of the API calls NLP, - make_analyzer, and analyze - is found in the main.cpp file of any analyzer project.
- -void - analyze(
- -char - *input, // - INPUT FILE PATH.
- -char - *output, // - OUTPUT FILE PATH.
- -char - *appdir, // - ANALYZER APPLICATION TOP DIR.
- -bool - flogfiles, // - OUTPUT INTERMEDIATE LOGS.
- -char - *outdir = 0, // - DIRECTORY FOR OUTPUT.
- -char - *inbuf = 0, // - IF ANALYZING A BUFFER, SUPPLY IT HERE
- -long - len = 0, // - LENGTH OF INPUT BUFFER
- -bool - compiled=false, // RUN COMPILED ANALYZER
- -ostream - *os = 0, // - STANDARD OUTPUT STREAM
- -char - *outbuf = 0, // - OUTPUT BUFFER TO BIND TO cbuf STREAM
- -long - outlen = 0, // - MAXIMUM LENGTH OF cbuf OUTPUT BUFFER
- -char - *datum // - STRING OF PARAMETERS TO ANALYZER [NEWLY DOCUMENTED 2.4.0.1]
- -);
- -- -
You have a choice of - specifying input from a file or a buffer. If - inbuf and len - are zero, then analyze() assumes that input comes from the input - file argument.
- -- -
Output is more flexible - in that during the analysis of a text, you can send output to a file, - a user-supplied stream, and a user-supplied buffer. output - specifies the default output file, outbuf - and its length outlen specify - an output buffer, and os specifies - an output stream. In - NLP++, you may also send outputs to additional files (see discussion of - output statements).
- -- -
The compiled - flag, if true, specifies that you are running a compiled version of the - analyzer (run.dll, see below). If - false, then you are running the same interpreted analyzer definition that - you have developed within VisualText.
- -- -
OUTPUT - FILE. The output argument leads nowhere in current-day NLP++. (That - is, there's no built-in NLP++ function such as cbuf() that writes to it.) - But you - can manually add it to the DATUM argument to pass it to the analyzer.
- -- -
DATUM - STRING. This arg has been available for many 2.x VisualText versions, - but hasn't been documented prior to 2.4.0.1. It - is a string that gets passed to the G("$datum") global variable - of the called analyzer. Typically, - one can separate values with a pipe character ('|') in the datum string, - and use something like
- -L("arr") - = split(G("$datum"),"|");
- -to read each parameter into an array element. - One can - use the parameters to set up output files, assign tasks, and pass information - to the called analyzer.
- -Instructions for compiling the analyzer and running compiled vs interpreted - mode in the standalone analyzer. (Currently VisualText doesn't provide - a way to run the compiled analyzer.) Can only compile the analyzer during - load of VisualText, at present. (Could also compile it from a C++ program, - if desired.)
- -1. Invoke VisualText.
- -2. Depress the toggle for compiling the analyzer: ![]()
3. Load the analyzer to be compiled. C++ code gets generated and compiled - (in the app\run folder) during analyzer load. NOTE: - In version 2, you will need to go to the run folder of your analyzer and - manually upgrade and compile the project. For - example, in version 2.3 and later, files are generated for each pass of - an analyzer.
- -Running - the compiled analyzer
- -Examine the API call for creating an analyzer, in main.cpp of the current - application folder:
- -nlp->make_analyzer(seqfile, appdir, develop, 0, compile-on-load, - compiled);
- -The compiled flag will load - the compiled analyzer if true. (Note: the interpreted analyzer is ALWAYS - loaded as well.) You can also specify that code be generated when making - the analyzer, by setting the compile-on-load argument to true.
- -To run the compiled analyzer, set compiled - to true in the call to analyze, as below.
- -nlp->analyze(infile,outfile,appdir,true,0,line,0,compiled);
- -- -
Unlike the analyzer, which can only be compiled during load, the knowledge
- base can be compiled at any time by clicking the compile kb button: ![]()
NOTE: In version 2, you will need to go to the - kb folder of your analyzer and manually upgrade and compile the project, - after the above. You - may also need to add all the .cpp and .h files in that folder to the kb - project in order for it to compile.
- -The user can save an interpreted version of the KB with the Save KB
- button at anytime as well: ![]()
Compiling very large KBs or loading interpreted KBs can take a long - time. A - hint for managing very large KBs is to load the compiled version, an option - that can be set in the File > Preferences menu item. Then, - the NLP++ functions kbdumptree - and take - can be used to dump and load subhierarchies of the kb that are being worked - on. (Also - available is: in the KB Editor window, select a concept whose tree is - to be dumped or reloaded. Right-click - and select Modular > Dump to dump the subtree to a .kb command file, - or Modular > Load to browse to a .kb file to be loaded.)
- -The knowledge base can also be compiled from a C++ program. In - the main.cpp file of the standalone app, add the API call
- -cg->genKb();
- -This will generate and compile C++ code for the knowledge base, creating - a kb.dll file in kb\Debug or kb\Release, as appropriate.
- -The user C++ project created - with a new analyzer provides an example of a user-defined NLP++ function, - in the Ucode.cpp file. An interpreted as well as compiled variant of the - function is exemplified. Methods for processing the function's arguments, - as well as accessing the parse tree and knowledge base, are illustrated.
- -One way to define a new NLP++ function is within the @DECL region, which - must be first in a pass file, if present. Another - way is to create a C++ function in the User project, as exemplified with - the function called testfn in - the file user\Ucode.cpp. The - assumption is that a user-defined function must participate in NLP++ expressions, - and so it must process arguments in the same way that other NLP++ functions - process arguments. It - must also return values by a special mechanism involving a retVal - object, as exemplified in the testfn example. From - a pass file, the function must be called with a user:: prefix. E.g., - user::testfn().
- -Just after an analyzer is loaded, the function ucodeIni() - is called, and just before an analyzer is closed, ucodeFin() - is called. These - functions are available in the User project and may be filled with user-defined - initializations and cleanups.
- -To update your analyzers to Version 2.0, you - will mainly need to regenerate and recompile the code in your projects. - First, - compare your code with that in the top level, kb folder, run folder, and - user folder of the Bare analyzer in c:\Program Files\TextAI\VisualText\Templates\Bare. - You may - need to add the code lines
- -#include
- <windows.h>
-#include <tchar.h>
-#include <my_tchar.h>
-#include <streamclasses.h>
to your StdAfx.h file, or
- -#include "vtapi.h"
- -as appropriate, in order to succesfully compile. - Then, regenerate - run and kb code, if you're using the compile version of the analyzer and - kb. Similarly, - recompile the user project for your analyzer, especially if you are using - functions there or adding new ones to extend NLP++.
- - - - diff --git a/Help/helps/VisualText_Basics/DebuggingOverview.htm b/Help/helps/VisualText_Basics/DebuggingOverview.htm deleted file mode 100644 index 2903aca..0000000 --- a/Help/helps/VisualText_Basics/DebuggingOverview.htm +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - -VisualText provides a number of debugging tools to make building text - analyzers easier. Screen shots from this section are from the VisualText - Sample "Corporate" analyzer.
- -Debug Structure: - Trees
- -Almost all debugging tools in VisualText are based on parse trees. VisualText - analyzers build parse trees, which organize information into meaningful - chunks. You can debug an analyzer pass-by-pass, by setting the Generate - Logs button and running the analyzer:
- -
followed by 
This will generate analyzer log files that contain trees for each text - processed. Each text will have its own set of trees. The log files are - displayed in the Text Tab under (indented and below) the corresponding - text file. (A red checkmark in a file indicates the file has been analyzed.) - You can see each of the log files generated for a file by clicking on - the plus sign in front of the text file. Log files for each pass in the - analyzer sequence have the name 'ana###.log' where ### is the number of - the pass in the analyzer sequence:
- -
Debug Context: - Ana Tab
- -The Ana Tab provides the context for what tree is displayed during debugging. - There is a tree built for every pass and when a pass is chosen in the - Ana Tab, all subsequent trees will be built from the selected pass.
- -Highlighting is the quickest way to see which rules in a pass have fired. - It operates on the text in the text file you are analyzing. Highlighting - is activated by clicking the Toggle - Highlight Mode button on the toolbar. It must be turned on before - you run the analyzer.
- -
Within the trees generated for each pass in the analyzer, VisualText - records which nodes were matched and which nodes were built in the pass. - Built nodes are highlighted in blue. Green highlighting indicates other - nodes that matched rules in the pass.
- -Blue Highlighting
- -If a pass has rules that match a text and a tree is constructed or modified, - the highlighting appears in blue. Below, the rule for "dollars" - builds a new concept "_money" in the tree and therefore highlights - the text in blue.
- -
Green Highlighting
- -For rules that do not construct or modify a tree, highlighting is green. - Below, the rule containing the concept "_company" matches and - constructs a concept in the Knowledge Base but does not change the parse - tree, therefore the text is highlighted in green:
- -
Dump files are a convenient - aid to debugging. They record information useful in debugging the analyzer. - Dump files can be displayed by using the "Wheelbarrow" icon - in the Debug Toolbar with a pulldown menu:
- -
Dump files are created by printing output to any file with a "txt" - extension using the piping printout operator "<<". Below - is the NLP++ code for printing out to the above "lookup.txt" - dump file:
- -
One convenient Right-Click menu function will get you started in printing - to a dump file. It printouts out a line to a "txt" file with - the same name as the pass file. In this case, we clicked on the "lookup" - pass in our corporate analyzer and the Right-Click menu adds the line - above the menu as shown below:
- -
Page Mode is used to see changes in parse trees between passes in the - Ana Tab, or between text files themselves. Page - Mode is activated by selecting the Toggle Page Mode button on the Debug - Toolbar:
- -
Page Mode: Between - Passes
- -Page Mode provides a convenient way to shuffle among sets of views. - For example, - selecting pass 16 below causes the parse tree for that pass to display - in the parse tree view. Selecting - pass 17 causes that parse tree view to automatically - display the parse tree for pass 17.
- -

Page Mode: Moving - Among Texts
- -A second use for Page Mode is to look at changes across text files. - With the Page Mode turned on, text files (including dump files), parse - tree windows, and browser windows will update their content with the current - text selected. The arrows next to the Page Mode will move the text selection - in the Text Tab either up or down:
- -

VisualText informs you of syntax errors via the Log Window. If a syntax - error is detected, you can often go directly to the line in the pass file - to locate the problem by double-clicking on the error in the Log Window. - Below, we forgot an opening parenthesis and by double-clicking on the - error, VisualText opens up the correct pass file and moves the cursor - to the line containing the error:
- -
VisualText's Find - in Files dialog is handy for finding words and concepts in an analyzer - project. One can search for a word or phrase in only the word files, text - files, or even in other analyzers in the user's analyzer area:
- -
Search results are displayed in the Find - Window. By - double-clicking on a search result line, you can go immediately to the - file and line containing an instance of the search string:
- -
- -
- - - - diff --git a/Help/helps/VisualText_Basics/Library_Passes.htm b/Help/helps/VisualText_Basics/Library_Passes.htm deleted file mode 100644 index 7d8e053..0000000 --- a/Help/helps/VisualText_Basics/Library_Passes.htm +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - - -
To help you get started building your text analyzer, VisualText comes - with several pre-built pass files. These - pre-built pass files are called library - passes. They - are available within Add menu - item of the Ana Tab popup menu.
- -Library passes contain NLP++ rules and code to recognize common or generic - types of data. Generic data includes telephone numbers, email addresses, - different types of money formats, dates, etc. VisualText - also provides library passes for importing existing databases into the - knowledge base.
- -There are two types of library passes: those - that are used by themselves and those that are part of a series of passes. -
- -Below is a summary of available library passes. Where - library passes are part of a series of passes, the total number of passes - is indicated next to the library pass name.
- - -|
- Library Pass Name |
-
- Description |
|
- Database (10) |
-
- Import a database into the KB hierarchy. Passes - can import database with both text and numeric fields. -Assumes first line of database file is a list - of field names. To - add a large database, it is more efficient to split up the database file - into smaller files. If - splitting large database into smaller files, the first line of each file - should include the list of field names. |
|
- Date Plus Numerics (9) |
-
- Recognize simple and compound numeric words, - numeric sequences and lists, various character formatting such as punctuation - and contractions, telephone numbers, and dates. |
|
- Emails |
-
- Recognize email addresses. |
|
- HTML (5) |
-
- Recognize HTML formatting elements, text tagging, - special HTML characters, and tagging structures. |
|
- Lines |
-
-
|
|
- Numerics (7) |
-
- Recognize simple and compound numeric words, - numeric sequences and lists, various character formatting such as punctuation - and contractions, and telephone numbers. |
|
- Remove Blank Lines |
-
- Remove blank lines. |
|
- Remove White Space |
-
- Remove white spaces. |
|
- Trends |
-
- Count the occurrence of words and phrases - in a text. |
|
- XML DTD (14) |
-
- XML document type definition. DTD - is used to define the XML document structure. -DTDs can be contained in the XML document, - or can be referenced from an external document. |
|
- Xml (21) |
-
- Process XML files. |
Library passes can be added to any part of your analyzer sequence. Note - however, that they may not be inserted before the system pass, tokenize. - When a - library pass is composed of a series of passes, all of the passes in the - sequence are added.
- -The insertion of library passes into an existing analyzer may not be - completely "seamless." That - is, the developer may need to reorder passes and edit contexts within - pass files (e.g., the list within a @NODES - context selector) in order to get the analyzer working properly with the - added library passes.
- -The set of library passes that accompanies VisualText is stored in the - spec folder of the installation directory. If - you installed the VisualText software on your c drive for example, the - library passes are contained in the following directory:
- -c:\Program Files\TextAI\VisualText\data\spec
- -You can create your own library passes and add them to the spec directory. - They will - automatically appear in the Library Passes submenu of the Ana Tab popup - menu.
- -Adding - passes to the analyzer sequence
- - - - diff --git a/Help/helps/VisualText_Basics/Standard_Rule_Format.htm b/Help/helps/VisualText_Basics/Standard_Rule_Format.htm deleted file mode 100644 index 9ce606c..0000000 --- a/Help/helps/VisualText_Basics/Standard_Rule_Format.htm +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - -To facilitate the editing of rules in pass files, we've developed a - convention called the standard rule format. - Its main requirement is that each element of a rule occupy a separate - line of text. If - is possible to write rules such that all rule elements are on the same - line. When - referencing nodes however, it is often helpful to have elements written - on separate lines.
- -The rules below are not in standard rule format. Notice that the elements - (_VP, _verb, _xWHITE, etc.) in each rule are all on the same line.
- -Rules written on a single line can be converted using the Pass File - Popup Menu item One - Line to Standard Rule Format:
- -- -
This results in a rule in standard rule format:
- -where each rule element (_VP, _verb, _xWHITE, - _NP, _xWHITE, _PP) appears on its own line.
- -Standard rule format has three distinctive features. Rule elements are - indented by a tab space, numbered with comments and displayed one per - line.
- -Indentation is for readability.
- -Numbering rule elements with comments makes for a convenient reference - when using NLP++™ node functions or functions that reference individual - elements in a rule. To see how this works, some NLP++ functions have been - added to the rule given above:
- -
The NLP++ node function N("$text",1) refers to the text for - rule element 1, N("$text",3) the text for rule element 3, and - N("$text",5) the text for rule element 5. In standard rule format, - if a person deletes a rule element with the right-click menu, the rule - elements will be renumbered automatically to facilitate the user in renumbering - of the NLP++ node function "N" by hand. In the future, node - function renumbering will be automatic with such edits.
- -Having one rule element per line allows for the use of right-click menu - items for quick editing. In standard rule format, users can quickly change, - convert, and delete rule elements and rule element attributes. In the - example below, a rule element is made optional by clicking anywhere on - the rule element of interest, and selecting the Add/Remove attribute "optional".
- -- -
Doing the above yields:
- -
- - - - diff --git a/Help/helps/VisualText_Basics/Structure_of_Analyzer_Projects.htm b/Help/helps/VisualText_Basics/Structure_of_Analyzer_Projects.htm deleted file mode 100644 index 1696ef0..0000000 --- a/Help/helps/VisualText_Basics/Structure_of_Analyzer_Projects.htm +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - - - -
When an analyzer is created and saved in VisualText™, a directory structure - is created in the working directory (e.g. C:\apps). This structure is - referred to as the analyzer project. The analyzer project stores - the analyzer and its related files.
- -An analyzer project is organized by a single analyzer - project file. The analyzer project file is automatically created - when you create an analyzer. The name of the analyzer project file is - the name you give the analyzer project appended with a .ana - extension. The analyzer project file, also called the .ana (pronounced - "dot ana") file, is used to load the analyzer.
- -NOTE 2.0.1.x - and later: Run, KB, and user DLL files are now renamed and moved - to the \bin folder when they are compiled. (And - these must be compiled manually.)
- -The folders and files in the analyzer project are outlined below.
- - -|
- Folder or - File |
-
- Description |
|
- bin |
-
- Executables and libraries. Stores the kb.dll
- compiled knowledge base library. |
|
- data |
-
- Miscellaneous data files created or used by - the app. |
|
- logs |
-
- Directory for the analyzer log file. |
|
- input |
-
- Input file tree. |
|
- kb |
-
- The interpreted and compiled KBs (kb.dll) - are stored here. |
|
- output |
-
- Directory for output files, dump files, log - files, intermediate output files, and so on. |
|
- rfa |
-
- Output for the RFA, which parses the RFB analyzer - definition. |
|
- rfb |
-
- Output for the RFB, which parses pass files. |
|
- run |
-
- Directory for the compiled analyzer library, - run.dll. |
|
- spec |
-
- Directory for the analyzer sequence file and - pass files. |
|
- user |
-
- Directory for the user - MS Visual C++ project. Can be used to write new NLP++ functions and passes. |
|
-
|
-
-
|
|
- cgerr.log |
-
- KB error log file. |
|
- gui.kb |
-
- KB command file that stores analyzer sequence - and input folder hierarchy. |
|
- main.cpp |
-
- Code file for a standalone driver program - to call the analyzer. |
|
- NAME.ana |
-
- The project file for the current analyzer - app. |
|
- Uanalyze.cpp |
-
- Code file for standalone driver program. |
|
- Uanalyze.h |
-
- Code file for standalone driver program. |
This folder structure houses all the information - needed to run the analyzer, including folders for input and output, a - folder for the knowledge base, etc.
- - - - diff --git a/Help/helps/VisualText_Basics/Writing_Analyzers_with_VisualText.htm b/Help/helps/VisualText_Basics/Writing_Analyzers_with_VisualText.htm deleted file mode 100644 index 8516095..0000000 --- a/Help/helps/VisualText_Basics/Writing_Analyzers_with_VisualText.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -The VisualText Basics section includes a set of topics designed to help - you build analyzers. As a prerequisite, we recommend you work through - the Tutorials to understand the workings of the VisualText GUI. Also, - working through the Corporate analyzer documentation and studying the - Corporate analyzer will provide a feel for the ordering and specification - of the steps, or passes, in a text analyzer.
- -Building text analyzers is more art than science. VisualText favors - a bottom up approach to text processing, where small constructs are processed - and grouped (or reduced) first, followed by identification of successively - larger components of a text.
- -One approach that often works well for restricted domains is to create - a prototype that processes a single input text end-to-end, to produce - the desired analyzer output. In building such a prototype, you should - strive to build each pass in as general a way as possible. Once such a - prototype is built, a second input text is tested, and the analyzer is - reworked so that both inputs are processed in a general way. As more inputs - are handled in this fashion, the analyzer will perform better and do more - with unseen texts. In a restricted domain, even a small number of representative - input texts (e.g., 25-50) can yield dramatic improvements in the processing - of novel texts.
- -Another aspect of this approach is that it is "knowledge free." - For a restricted domain, you don't usually need an ontology or knowledge - base for all human knowledge. You build or import knowledge as needed. - The broader the domain, of course, the more the analyzer will benefit - from large-coverage knowledge bases, such as WordNet.
- -If you are interested in pre-built generic - text analysis capabilities for VisualText, you may wish to download one - of the versions of TAIParse available in the Apps section of our website - at
- -http://www.textanalysis.com/Apps/apps.html
- -- - - - diff --git a/Help/helps/VisualText_Interface/AnaArchViewLocal.gif b/Help/helps/VisualText_Interface/AnaArchViewLocal.gif deleted file mode 100644 index 914a682..0000000 Binary files a/Help/helps/VisualText_Interface/AnaArchViewLocal.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/AnaArchViewRemote.gif b/Help/helps/VisualText_Interface/AnaArchViewRemote.gif deleted file mode 100644 index 2d1ef43..0000000 Binary files a/Help/helps/VisualText_Interface/AnaArchViewRemote.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Interface_Intro.htm b/Help/helps/VisualText_Interface/Interface_Intro.htm deleted file mode 100644 index f73baef..0000000 --- a/Help/helps/VisualText_Interface/Interface_Intro.htm +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - - - - -
The major components of the VisualText™ user interface (or Main Window) - are called out below.
- -
Apart from the Main Menu, you can resize and "undock" (i.e., - move about) the components shown.
- -A short description of each of the interface components is given below.
- - -|
- Interface |
-
- Description |
| - | -
- Functions accessed via pulldown menus. The - Main Menu includes the following menus: File, Edit, - Analyzer, KB, - View, Browser, - Parse Tree, Tools, - Window, Help. |
| - | -
- Controls access to the sample hierarchy, analyzer - sequence and text data files. |
| - | -
- Displays processing information and error - messages. |
| - | -
- Displays search information. |
| - | -
- Area where input and output files, the knowledge - base and tree structures are displayed and manipulated. |
| - | -
- Commonly used functions accessed by buttons. |
| - | -
- Iconic functions for the Tab Window. |
| - | -
- World Wide Web access and browser control. |
| - | -
- Iconic access to the Analyzer, Knowledge Base, - and more. |
| - | -
- Functions to examine parse trees, intermediate - files, and output files. |
In addition to these objects, popup menus appear when you select a window - and right-click the mouse. See Popup - Menus for detailed description of available functions from popup menus.
- -- - - - diff --git a/Help/helps/VisualText_Interface/Knowledge_Base.htm b/Help/helps/VisualText_Interface/Knowledge_Base.htm deleted file mode 100644 index c8d903c..0000000 --- a/Help/helps/VisualText_Interface/Knowledge_Base.htm +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - -
The Conceptual Grammar (CG) Knowledge Base Management System (KBMS) - provides a permanent store for linguistic, conceptual, and domain knowledge. - The KBMS serves as a flexible "vanilla" framework in which users - may implement arbitrary representation schemes. Users can manage the KB - manually, while text analyzers can automatically access and update information - in the KB. The KB can be used to collect information across multiple texts, - for example, in training a categorizer or in managing an electronic chat.
- -The basic unit of knowledge in the KB is called a concept, - which is analogous to an object - in an object-oriented representation. A concept has attributes, - which consist of a key (or slot) and zero or more values. - The major organizing principle in the KB is a hierarchy - of concepts. Concepts can also refer to other concepts via attributes, - yielding a rich graph of knowledge.
- -A - unique feature of our Conceptual Grammar KBMS is that each concept may - optionally "own" a phrase, - which is a data structure that represents sequential information in a - convenient way. A phrase is composed of nodes, - which differ from concepts in that they are not attached to the hierarchy. - A node is a proxy or instance - of a concept in the hierarchy. Most NLP++™ functions that operate on concepts - also operate on nodes. The main data structures in the KB are:
- - -|
- Data Structure |
-
- Description |
|
- CONCEPT |
-
- Organizing unit of knowledge in the KB. |
|
- ATTR |
-
- Attribute key or slot. |
|
- VAL |
-
- Value of an attribute. |
|
- PHRASE |
-
- Sequence of nodes attached to a concept. |
|
- NODE |
-
- A proxy or instance of a concept. |
Attributes may take on three types of values: integer, string, or concept. - A single attribute may mix values with any or all of these types, as desired.
- -Phrases can be used to implement idioms, patterns, samples, rules, and - other sequential information. In the Gram Tab, the phrase associated with - a rule concept is used to represent user-highlighted samples. Each node - represents a single sample, with the name of the node doubling as the - sample's text.
- -See Table of KB Functions - for a listing of the available NLP++ functions for managing the KB. These - functions are also treated individually in the Knowledge Base Functions - section.
- -The backbone of the KB is a knowledge hierarchy. Each concept therefore - has hard-coded parent and child links for efficiency.
- -VisualText utilizes part of the concept hierarchy to implement the Gram Tab. The Gram - hierarchy (also called the sample - hierarchy) displayed in the Gram Tab is embedded directly in the - concept hierarchy. The KB as a whole is accessible in the KB - Editor:
- -
When users highlight samples and add them to the - Gram Tab, they are modifying the KB. The left panel above shows the sample - hierarchy within the Gram Tab, while the right panel shows the same hierarchy - as it appears within the KB. In the KB Editor, a concept that contains - a phrase is colored yellow. For example, the adj concept contains a phrase, - where each node of the phrase represents one of the samples "quick", - "brown", etc. Therefore det, adj, noun, verb, and prep are all - colored yellow. To view a concept's phrase from the KB Editor, right click - on the concept and select Phrase Tool from the menu.
- -A phrase is a sequence of nodes "owned" by a concept, and - is not visible from the concept hierarchy. For example, the concept "noun" - has the phrase shown below, consisting of the nodes "fox", "dog", - "John", and so on. (In the present example, the ordering of - nodes in the sequence is not important. But, in other uses of phrases, - for example to represent grammar rules, ordering is important.) A concept - can only have one phrase, with no restriction on the number of nodes. - The Phrase Tool, shown below, enables you to view a concept's phrase. - Each line in the Phrase Tool displays the name of one node, which can - be an arbitrary string.
- -The phrase belonging to a concept can be viewed in - the KB Editor by highlighting a yellow - concept in the hierarchy, right clicking and selecting Phrase Tool from - the Popup Menu. This displays the nodes of the phrase, one per line. In - the example below, we selected the concept 'noun' and then selected Phrase - Tool in the menu to display the phrase associated with 'noun'. In this - example, each node in the phrase represents a noun sample in the Gram - Tab.
- -
A node is an instance of a concept, and does not - appear in the concept hierarchy. Nodes occur only as components of phrases - in the KB. The nodes belonging to the noun concept happen to be instances - of the KB dictionary concepts for "fox", "dog", etc.
- -You can access the attributes for a particular node - by highlighting the node in the Phrase Tool and selecting Attributes, - or by double clicking on a line. This launches the Attribute - Editor, where the attributes and values for the node can be viewed - and edited. In the graphic below, the attributes for the selected node, - 'fox', are displayed.
- -
|
- WARNING: - The Gram Tab is the only safe way to edit the Gram hierarchy. Editing - the gram or sys - hierarchies manually can easily corrupt the KB, so please make a backup - copy of your analyzer project before experimenting. |
- -
The KB may be managed in many ways. The KB Editor, Gram Tab, Attribute Editor, - and Phrase Tool provide interactive means for accessing the KB. NLP++ - function calls and C++ API function calls provide more direct access to - the internals of the knowledge base. (For more information on accessing - the KB, see the Table - of KB Functions and the page-per-functions in the Knowledge Base Functions - section .)
- - - - diff --git a/Help/helps/VisualText_Interface/Log_Window_Messages.htm b/Help/helps/VisualText_Interface/Log_Window_Messages.htm deleted file mode 100644 index 78a9d13..0000000 --- a/Help/helps/VisualText_Interface/Log_Window_Messages.htm +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - - - - - -Two types of messages are given in the Log Window: informational - messages and error messages.
- -The Log Window is divided into two parts: Events and Details.
- -Here are some of the most common informational messages displayed in - the Log Window.
- - -|
- Message |
-
- Description |
|
- Loading stat: Initializing time |
-
- Time basis for start of boot sequence timing. |
|
- Loading stat: “Auto-load” analyzer turned - off |
-
- Time required to load IDE without an analyzer. - (See the General Preferences - for auto-loading an analyzer at startup.) |
|
- Loading stat: Total - time |
-
- Time required to load IDE. |
|
- Loading stat: Loading - "analyzerName" KB - NUM |
-
- Time required to load the KB for analyzer - called analyzerName. |
|
- Loading stat: Loading - "analyzerName" Analyzer - NUM |
-
- Time required to load the analyzer. |
|
- Loading stat: Finalizing - - NUM |
-
- Time required to finish load sequence. |
|
- Loading stat: Total - time: NUM |
-
- Total time required to load knowledge base - and analyzer. |
|
- Analyzer Load: 0 0 [Date: Day, Month, Time, - Year] |
-
- Day, date and time analyzer is loaded. |
|
- Analyzer Load: 0 - 0 [Read analyzer sequence from kb.] |
-
- Indicates analyzer is being read from the - knowledge base. |
|
- Analyzer Load: 0 0 [Build analyzer time=NUM - sec] |
-
- Total time to build analyzer. |
|
- Analyzing (NUM) TextFile |
-
- Name of text currently being analyzed. |
|
- Time = NUM |
-
- Time required to process text. |
|
- Analysis done (NUM) FilePath |
-
- Name and directory path of analyzed file. |
Error and warning messages are displayed in the Log Window. These messages - provide you with a way of seeing what is happening when the analyzer is - run. They can be a valuable tool when debugging your analyzer. Some of - the most common error messages are given below.
- - -|
- Message |
-
- Description |
|
- RightMatchSpecial unimplemented |
-
- Indicates _xWILD may have been used at the - beginning and/or end of a rule's phrase. This is currently not supported. - Try _xANY instead. Or try _xWILD in combination with _xSTART and/or _xEND - such that _xWILD does not occur at the beginning or end of the phrase. |
|
- No Rule Reduce: Can’t attach semantic data |
-
- Indicates that an S variable will be discarded, - since the rule does not create a suggested node. |
|
- Check: Error in NLP++. |
-
- Indicates a runtime error in a CODE, CHECK, - or POST region of a pass file. Possible errors are an NLP++ syntax error - or a mismatch between the code and the rules that it applies to. For example, - if an optional rule element matched no nodes, but the code attempts to - assign a variable to the element's node, this error message will appear. |
|
- Error. Analyzer pass '<NAME>' is uninterned |
-
- Indicates that a pass in the analyzer sequence - contains syntax errors and is being skipped over. |
|
- Pat pass given no rules |
-
- Indicates possible syntax error in a rule - of the pass file. Check for missing CODE Region labels. |
The Analyzer Menu controls the actions of an analyzer. It - is also used in generating rules.
- -
The Analyzer Menu corresponds to some elements in - the Workspace Toolbar.
- -![]()
When there is a corresponding element, the toolbar button is shown in - the following table:
- - -|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- Compile Analyzer |
-
- Turning on this toggle, followed by loading - an analyzer, results in compiling the analyzer while it is being loaded. - This results in the creation of a RUN.DLL library, which can be called - from an external program. Currently, VisualText does not load the compiled - analyzer library. The Compile Analyzer toggle is turned off after an analyzer - is loaded. |
|
-
|
-- | -
- Submenu for generating rules. (See below.) |
|
-
|
-- | -
- Runs the analyzer on the currently selected - input file. (Analyzers cannot be run on files with a .log extension.) |
|
-
|
-- | -
- Runs the analyzer on the next file in the - directory after the currently selected file. |
|
-
|
-- | -
- Does a Generate Rules All, followed by a Run - on the currently selected input. |
|
-
|
-
- Stop |
-
- Stops the current analyzer. |
|
-
|
-- | -
- When selected, enables generation of intermediate - logs for each pass in the analyzer sequence. Must be enabled before an - analyzer is run over text. This function gives you the ability to display - and inspect the intermediate parse trees, one for each pass, and the final - tree. It may slow the parse substantially in many-pass analyzers, since - all intermediate trees are written to disk. If the function is not enabled, - only the final tree is available for display. |
|
-
|
-- | -
- Submenu for viewing text analyzer information - such as input files, output files, pass files, and parse trees. (See below.) |

|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- All |
-
- Exhaustively generates all rules as specified - by samples in the Gram Tab. - Depending on the number of samples in the Gram - Tab, this can be slow. However, to assure that rule generation - is correct and complete, this option should be used whenever feasible. |
|
-
|
-
- Dirty |
-
- Generates rules only for those rule concepts - in the Gram Tab that have the - Dirty attribute set. This attribute - is set by the system, for example, when new sample data is added to the - concept. This is a "quick-and-dirty" rule generation that most - often works well, but may not always agree with the Generate Rules > - All option. It is used for rapid prototyping. See Mark - for Generation in the Gram Tab Popup Menu, where the Dirty attribute - can be set. |
|
-
|
-
- Unlocked |
-
- Generates rules only for those concepts in - the Gram Tab that have the unlocked - attribute set. Locking concepts should only be done by the expert user. - A concept's attributes can be viewed and hand edited via the Attribute - Editor. |

- - -
|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- Concept Tree |
-
- Displays the concept - tree of a parsed document in the Workspace. |
|
-
|
-
- Current Text |
-
- Displays the currently selected input data - file in the Workspace. |
|
-
|
-
- Dump Files |
-
- Displays the output - files associated with a parsed document in the Workspace. When there are - multiple files, a pulldown tab to the right of the button lists available - files. |
|
-
|
-
- Output File |
-
- Displays output.txt file associated with parsed - input document in the Workspace. This - icon is reserved for files with the name output.txt only. |
|
-
|
-
- Parse Tree |
-
- Displays the full parse - tree of a parsed document in the Workspace. |
|
-
|
-
- Pass File |
-
- Displays selected pass - file in the Workspace. |
|
-
|
-
- Web Page |
-
- Displays selected html page in a browser window - in the Workspace. |
The Browser Menu provides access to the World Wide Web and various controls - for browsers.
- -
The Browser Menu corresponds to some functions on the - Browser Toolbar.
- -![]()
|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- Back |
-
- Loads previous Web page (if there is one) - in the history list. Function is disabled if no Urls are in the history - list. |
|
-
|
-
- Forward |
-
- Loads next Web page (if there is one) in the - history list. Function is disabled if no Urls are in the history list. |
|
-
|
-
- Open URL |
-
- Launches dialog box to enter URL. Web page - is opened in the Workspace. |
|
-
|
-
- Stop |
-
- Stops loading a Web page. |
|
-
|
-
- New Browser |
-
- Opens a new browser window. Browser - opens to location of existing open browser. the - desired Web address can be typed directly into the Location Input Panel. |
|
-
|
-
- Save URL - Text |
-
- Copies the URL name and html file to the Text - Tab. Function is enabled when a browser is selected in the Workspace. |
- - - - diff --git a/Help/helps/VisualText_Interface/Main_Edit_Menu.htm b/Help/helps/VisualText_Interface/Main_Edit_Menu.htm deleted file mode 100644 index d8349bc..0000000 --- a/Help/helps/VisualText_Interface/Main_Edit_Menu.htm +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - - - -
The Edit Menu controls actions done to files in the Workspace.
- -
The Edit Menu corresponds to some buttons on the Main - Toolbar.
- -![]()
When there is a corresponding element, the toolbar button is shown in - the following table:
- - -|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- Undo |
-
- Reverses the last action performed in a file - in the Workspace. |
|
-
|
-
- Redo |
-
- Reverses an Undo action performed in a file - in the Workspace. |
|
-
|
-
- Cut |
-
- Deletes selected object in a Workspace file. |
|
-
|
-
- Copy |
-
- Copies selected object to the clipboard. |
|
-
|
-
- Paste |
-
- Pastes object from the clipboard at insertion - point in currently selected file. |
|
-
|
-- | -
- Saves selected file in the Workspace. |
|
-
|
-
- Save All |
-
- Saves all unsaved files in the Workspace. |
|
-
|
-
- Find |
-
- Launches Find dialog box to search for item - in open file. |
|
-
|
-
- Replace |
-
- Launches Replace dialog box to find and replace - item in open file. |
|
-
|
-
- Find in Files |
-
- Launches Find - in Files dialog box to search for items across multiple files. File - type can be specified. Search results are displayed in the Find - Window. |
|
-
|
-
- Replace in Files |
-
- Launches Replace - in Files dialog box to find and replace items across multiple files. - Search - and replace results are displayed in the Find - Window. |
The File Menu is context sensitive. Available menu items change when - a text file is open in the Workspace. Here - is the File Menu when all options are available.
- -
The File Menu corresponds to some elements in the Main Toolbar.
- -![]()
When there is a corresponding element, the toolbar button is shown in - the following table:
- - -|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- New |
-
- Creates a new file and displays it in the - Workspace window. |
|
-
|
-
- Open |
-
- Opens a file and displays it in the Workspace. |
|
-
|
-
- Close |
-
- Closes currently selected file in the Workspace. |
|
-
|
-
- Save |
-
- Saves currently selected file in the Workspace. |
|
-
|
-
- Save As |
-
- Saves currently selected file in the Workspace - with a new name. |
|
-
|
-
- New Analyzer |
-
- Creates a new analyzer. Only one analyzer - can be open at a time in an instance of VisualText™. If an existing analyzer - is open, it will be closed and the new one loaded. Two instances of VisualText - can be launched however, thereby having two different analyzers running - at the same time. |
|
-
|
-
- Open Analyzer |
-
- Launches Open dialog box to navigate to location - of .ana - file to open the analyzer. |
|
-
|
-
- Save Analyzer |
-
- Saves currently loaded analyzer including - the Knowledge Base. |
|
-
|
-
- Save Analyzer As |
-
- Saves currently loaded analyzer with a new - name. |
|
-
|
-
- Close Analyzer |
-
- Closes currently loaded analyzer. |
|
-
|
-
- |
-
- Prints currently selected file in the Workspace. |
|
-
|
-
- Print Preview |
-
- Prints preview of currently selected file - to the screen. |
|
-
|
-
- Page / Print Setup |
-
- Launches Page Setup dialog box with printing - options. |
|
-
|
-- | -
- Submenu for archiving the analyzer. (See below.) |
|
-
|
-
- Recent Files |
-
- Lists recently opened files in a submenu. - Selected file is opened in the Workspace. |
|
-
|
-- | -
- Submenu for selecting recently opened analyzers. - (See below.) |
|
-
|
-- | -
- Launches VisualText Preferences dialog box - to set various preferences. (See - below.) |
|
-
|
-
- Exit |
-
- Exits the VisualText program. |
The archive functions allow you to load and store analyzers compactly - in zip files either on a local machine or on a server. Archiving is used - to create quick backups of your work and to facilitate communication between - developers working on the same analyzers. Files are transmitted via FTP. - The FTP parameters can be set by selecting the Archiving - tab in Preferences. When you archive directly to the server, a file is - created on your local disk. Information on uploading to the server is - displayed in the Log Window.
- -
|
- Menu Item |
-
- Description |
| - | -
- Launches an Archive dialog to create a local - archive of the analyzer project file in a zip file. By default, the project - is archived in the project directory. The name of archive file defaults - to the name of the current analyzer, suffixed with the current date and - time. User has option to save C files and log files for analyzer session. |
| - | -
- Launches an Archive dialog to create a remote - archive of the analyzer project files in a zip file. An archive file is - also created locally. Local archive location defaults to the project directory. - The name of archive file defaults to the name of the current analyzer, - suffixed with the current date and time. User has option to save C files - and log files for analyzer session. |
| - | -
- Displays analyzers in the local archive, and - presents options to delete, rename, upload (send to server) or load into - current analyzer Workspace. Listings in archive can be sorted by clicking - on column headers. |
| - | -
- Displays analyzers in the server archive, - and presents options to delete, rename, download (send to local archive) - or load into current analyzer Workspace. Listings - in archive can be sorted by clicking on column headers. |



Selecting Recent Analyzers will bring up the list of recently loaded - analyzers. The selected analyzer is opened in the Workspace. Selecting - an analyzer closes an already open analyzer. The analyzer listed at the - top of the list is the most current.
- -
The Preferences menu item launches the VisualText Preferences dialog. - The VisualText - Preferences dialog has tabs to set the following preferences:
- -The General Preferences tab allows you to set initialization, analyzer - and application directory information.
- -
- - -
|
- Dialog Item |
-
- Description |
|
- Auto Load - Last Analyzer |
-
- If checked, the last analyzer loaded will - be loaded on program launch. The last analyzer loaded is displayed under - the check box. If the check box is cleared, no analyzer is loaded on program - launch. |
|
- Full Screen |
-
- If checked, VisualText launches into full - screen. If the box is cleared, it launches in reduced screen. |
|
- Auto Save - KB on Logout |
-
- If checked, automatically saves the knowledge - base when exiting an analyzer. If not checked, user is prompted to save - the knowledge base when exiting. |
| - | -
- By default, checked when an analyzer is launched. - Enabling - this mode prevents manual editing of the gram and sys hierarchy concepts - in the knowledge base, by greying out portions of KB - Editor Popup Menu when the gram or sys hierarchy concepts are selected. - Manual - editing of the gram and sys hierarchies can easily corrupt the knowledge - base. |
|
- Auto Comment - Name |
-
- Name for current author or developer. Specified - name will be added to the header comment section when pass files are generated. |
|
- Apps Directory |
-
- Path for the default directory for analyzer - projects. |
|
- Done |
-
- Closes the VisualText Preferences dialog. |
- -
The Display Preferences tab allows you to set preferences for the VisualText - interface.
- -
|
- Dialog Item |
-
- Description |
|
- Size to Content |
-
- If checked, window size for file when opened - in the Workspace is determined by the content of the file. |
|
- Size Dynamically |
-
- If checked, then every window opened in the - Workspace grows as the user expands items in that window. (Note: Window - grows only to the default size specified in Preferences. Size to Content - must also be checked. See Programming - Notes and Issues.) |
|
- Rule Tab - Size |
-
- Amount of indenting space in rule files. |
|
- Fixed Font - Size |
-
- Default font size settings. |
|
- Width |
-
- Default width of files opened in VisualText - Workspace. |
|
- Height |
-
- Default height of files opened in VisualText - Workspace. |
|
- Done |
-
- Closes the VisualText Preferences dialog. |
The Email Preferences tab is where you set email related information. - Before - you can use the Email Tool, you - must these preferences.
- -
|
- Dialog Item |
-
- Description |
|
- SMTP Server |
-
- SMTP (Simple Mail Transport Protocol) address - of the server where email is received. |
|
- From Email |
-
- Email address of author or developer. |
|
- Done |
-
- Closes the VisualText Preferences dialog. |
The Archiving Preferences tab is where you set server and user information.
- -
|
- Dialog Item |
-
- Description |
|
- Author Name |
-
- Name for archive author. |
|
- FTP Location |
-
- FTP site of archive. For - example, ftp.companyName.com. |
|
- Directory - Path |
-
- Location of archive at FTP site. For example, - archiveDirectory/myArchives. |
|
- Username |
-
- Name used to log into FTP site. |
|
- Password |
-
- Password used to access FTP site. |
|
- Done |
-
- Closes the VisualText Preferences dialog. |
The Dictionary Lookup Preferences tab is where you set up preferences - for loading online dictionaries. Dictionaries - specified here are used by the Dictionary - Lookup Tool. The - URL path for the WordNet dictionary is set by default. Specified - dictionaries are listed in the table once they are added.
- -
|
- Dialog Item |
-
- Description |
|
- Name |
-
- Input panel to specify the name of the online - dictionary. |
|
- URL |
-
- Input panel to specify URL for online dictionary. For - common online sites and more information on specifying URLs, see URLs - for Dictionary Lookup. |
|
- Add |
-
- Adds specified online dictionary and URL to - the list of dictionaries. |
|
- Update |
-
- Saves changes made to an existing dictionary entry. |
|
-
|
-
- Moves table selection up one position. |
|
-
|
-
- Moves table selection down one position. |
|
- Delete |
-
- Deletes selected table item. |
|
- Done |
-
- Closes the VisualText Preferences dialog. |
The Analyzer Dependent Preferences tab is where you set analyzer dependent - preferences. When - the Load Compiled KB box is checked, the compiled knowledge base is loaded - when the analyzer is launched.
- -If the knowledge base has been edited during a session, upon exit the - knowledge base will be compiled again. If - Auto Save KB on Logout is not checked, you will be prompted with a confirmation - prompt.
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Main_Help_Menu.htm b/Help/helps/VisualText_Interface/Main_Help_Menu.htm deleted file mode 100644 index d6f5f5b..0000000 --- a/Help/helps/VisualText_Interface/Main_Help_Menu.htm +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - -
The Help Menu provides access to the VisualText Help documentation and - to general information about VisualText.
- -
|
- Menu Item |
-
- Description |
|
- VisualText - Help |
-
- Launches the VisualText - Help documentation. |
|
- Context Help |
-
- Enables Context-Sensitive - Help. |
|
- About - VisualText |
-
- Launches VisualText product and version information. |
- - - - diff --git a/Help/helps/VisualText_Interface/Main_KB_Menu.htm b/Help/helps/VisualText_Interface/Main_KB_Menu.htm deleted file mode 100644 index 0ead3a5..0000000 --- a/Help/helps/VisualText_Interface/Main_KB_Menu.htm +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - -
The KB (Knowledge Base) Menu is used to control actions in the Knowledge - Base.
- -The Knowledge Base can store knowledge - of any type. VisualText itself uses the KB to manage information, including - the Concept Hierarchy, - the sequence of passes in the analyzer, the dictionary, and much more.
- -
The KB Menu corresponds to the first part of the - Workspace Toolbar:
- -![]()
The corresponding element on the toolbar button is shown in the following - table:
- - -|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-
- KB Editor |
-
- Launches the KB - Editor. |
|
-
|
-
- Attribute Editor |
-
- Launches the Attribute - Editor. |
|
-
|
-
- Compile KB |
-
- Compiles the Knowledge Base. Action results - in the creation of a KB.DLL. Preferences to load the compiled Knowledge - Base can be set in Preferences from the File Menu. The KB.DLL library - can be used with either an interpreted or compiled VisualText-built analyzer. |
|
-
|
-
- Move Concept Up |
-
- Moves a selected concept in the concept hierarchy - 'up' one position. |
|
-
|
-
- Move Concept Down |
-
- Moves selected concept in the concept hierarchy - down one position. |
|
-
|
-
- Save KB |
-
- Makes changes to the KB permanent. Changes - made during a VisualText session are stored in memory. If KB is not saved, - all changes made are lost upon exiting. |
- - - - diff --git a/Help/helps/VisualText_Interface/Main_Parse_Tree_Menu.htm b/Help/helps/VisualText_Interface/Main_Parse_Tree_Menu.htm deleted file mode 100644 index 5d6fa56..0000000 --- a/Help/helps/VisualText_Interface/Main_Parse_Tree_Menu.htm +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - - -
The Parse Tree Menu controls actions with parse tree displays.
- -There are several ways to enable this menu. One way is by running an
- analyzer on an input file, then selecting View
- > Parse Tree from the Analyzer Menu or by clicking on the Parse Tree button
.
Another way is by selecting Analyzer
- > View > Concept Tree or selecting the Concept
- Tree button
.
Yet another way to activate the Parse - Tree Menu, is by right clicking on a text that has been analyzed - and selecting View > Parse Tree.
- -
A tree display is affected by the selection of the Generate Logs button. - If the analyzer has been run with Generate Logs on, the parse tree for - the currently selected pass in the Ana Tab is displayed. If however, Generate - Logs is off, the final parse tree is displayed.
- -These are the choices in the Parse - Tree Menu:
- - -|
- Menu Item |
-
- Description |
|
- Close All |
-
- Collapses the tree display to the root node only. |
|
- Open All |
-
- Expands all nodes in the tree display. |
|
- Open Item - All |
-
- Expands all nodes under the selected node - in the tree display. |
|
- Open One - Level |
-
- Expands one level under the selected node - in the tree display. |
|
- Highlight - Text |
-
- Highlights the text in the input file corresponding - to the selected node in the tree display. |
|
- Display as - Root |
-
- Displays the selected node as the root of - the tree display. Only the selected node is displayed. |
|
- Display Entire - Tree |
-
- Displays the full parse tree, starting at - the root, assuming that the current selection in the Text Tab has been - analyzed. |
|
- Find Selected - Node in Files |
-
- Searches for the selected node's name in the - project files. Results are displayed in the Find Window. |
The View > Node Variable Mode - menu item and the View > Offsets Mode - menu item both affect the display of a parse tree as well. The - former displays variables and values for a node in a yellow box, and the - latter displays the text start and end offset for each node in the parse - tree.
- - - - diff --git a/Help/helps/VisualText_Interface/Main_Tools_Menu.htm b/Help/helps/VisualText_Interface/Main_Tools_Menu.htm deleted file mode 100644 index 6659f10..0000000 --- a/Help/helps/VisualText_Interface/Main_Tools_Menu.htm +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - -The Tools Menu controls the display of some of VisualText tools. Tools - listed in this menu are also available from the Text - Tab Popup and the Text File Popup - menus.
- -
|
- Menu Item |
-
- Description |
| - | -
- Displays the ASCII - Table. ASCII Table displays the decimal and hexadecimal numbers and - their corresponding ASCII characters. |
|
- Character Viewer |
-
- Launches an Open dialog to navigate to a file. - Once file - is selected, Character Viewer - is displayed. Character Viewer shows the line number, cumulative count - of total characters seen per line, characters on a line, and ASCII characters - for each line of text in selected file. Under each line is the hexadecimal - value of each character above it. |
| - | -
- Submenu to perform dictionary related functions. - (See below.) |
|
- Email Tool |
-
- Launches the Email - Tool. Email Tool enables sending email directly from the VisualText - interface. Preferences must be set in the Email tab of the VisualText - Preference dialog which can be accessed by selecting File - > Preferences. |
|
- Hex Viewer |
-
- Launches an Open dialog to navigate to a file. - Once file - is selected, Hex Viewer is displayed. |
|
- Text File Info |
-
- Launches an Open dialog to navigate to a file. - Once file - is selected, the Text File Info - dialog is displayed. This tool provides statistics about the selected - text file, including creation date, character, word and line counts. |
- -
The Dictionary menu option allows you to perform dictionary related - functions.
- -
|
- Menu - Item |
-
- Description |
|
- Add Word |
-
- Launches a dialog to add a word to the dict - hierarchy of the Knowledge Base. Words can only be added to the dict hierarchy - one at a time. Word - added to Knowledge Base is noted in Log Window. |
|
- KB Attributes |
-
- Launches a dialog to find a word in the dict - hierarchy of the Knowledge Base and view its attributes. If - there is an entry for the word in the dict hierarchy, the Attribute - Editor is launched. If - the word does not exist in the hierarchy, a message is written to the - Log Window. |
|
- Lookup |
-
- Displays list of online dictionaries specified - in the Dictionary Lookup - Preferences tab. Selecting - an option in the Lookup menu launches a dialog to search for a word in - the selected online source. See - Dictionary Lookup for more - information on using this tool. |
- - - - diff --git a/Help/helps/VisualText_Interface/Main_View_Menu.htm b/Help/helps/VisualText_Interface/Main_View_Menu.htm deleted file mode 100644 index 650187e..0000000 --- a/Help/helps/VisualText_Interface/Main_View_Menu.htm +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - - - - - -
The View Menu controls the display of various windows and toolbars in - the Interface. The - View Menu is also used to control certain VisualText modes.
- -
Part of the View Menu corresponds roughly to the following sections - of the Workspace Toolbar and the Debug - Toolbar
- -![]()
Another part corresponds to a piece of the Main - Toolbar:
- -![]()
When there is a corresponding element, the toolbar button is shown in - the following table:
- - -|
- Button |
-
- Menu Item |
-
- Description |
|
-
|
-- | -
- Instructs VisualText to analyze groups of - files in an efficient mode. VisualText does not save intermediate and - output files in batch mode. The text analyzer must explicitly create a - location for output that is to be retained in batch mode. The NLP++™ function - called batchstart() enables a text analyzer to check when the first text - in a batch run is being analyzed. |
|
-
|
-- | -
- When selected, enables highlighting of words - or phrases in a text file matching selected pass in the Ana Tab or selected - concept in the Gram Tab. Must be selected before an analyzer is run over - text. This tool allows you to quickly see whether and where a rule is - applying. |
|
-
|
-- | -
- When selected, enables the display of node - variables in the parse tree. |
|
-
|
-- | -
- Enables the display of offset information - for terminal nodes in a parse tree display. Offset information is displayed - as two numbers. For - example [0,10], indicates the first character of the node starts at character - position 0 (i.e. the first character on a line) and ends at character - position 10. |
|
-
|
-
- Tree Text Mode |
-
- Parse tree displays text based on what is - in the parse tree. If - nodes are removed from the tree, such as HTML tags, then the parse tree - view removes the tag text as well. |
|
-
|
-- | -
- Maintains coordinated sets of documents. For - example, when the user runs the analyzer, its corresponding output and - tree windows are updated automatically. Similarly when selecting passes - in the Ana Tab, Page Mode activates the Next Text and Previous Text buttons - to its right. |
|
-
|
-- | -
- Enables the display of details from the loading - of the analyzer. Results are displayed in the Log Window. When - a folder of files is analyzed, the processing time for each file is displayed. |
|
-
|
-
- Next Text |
-
- Displays the next input text file according - to the ordering in the Text Tab. Works in Page Mode to automatically update - the open documents associated with the input text. |
|
-
|
-
- Previous - Text |
-
- Displays previous input text file according - to the ordering in the Text Tab. Works in Page Mode to automatically update - the open documents associated with the input text. |
|
-
|
-
- Status Bar |
-
- Displays status or description of GUI objects - and actions. |
|
-
|
-- | -
- Submenu that controls the visibility of toolbars - in the VisualText Main Window. (See below.) |
|
-
|
-
- Find Window |
-
- Toggles the visibility of the Find Window. - By default, the Find Window is located in the bottom right portion of - the interface. |
|
-
|
-
- Log Window |
-
- Toggles the visibility of the Log Window. - By default, the Log Window is located in the bottom left portion of the - interface. |
|
-
|
-
- Tab Window |
-
- Toggles the visibility of the Tab Window. - By default, the Tab Window is located in the middle left portion of the - interface. |

|
- Menu Item |
-
- Description |
|
- Browser |
-
- Controls the display of the Browser Toolbar. |
|
- Debug |
-
- Controls the display of the Debug Toolbar. |
|
- Main |
-
- Controls the display of the Main Toolbar. |
|
- Tab |
-
- Controls the display of the Tab Toolbar. |
|
- Workspace |
-
- Controls the display of the Workspace Toolbar. |
The Window Menu controls the arrangement and display of open windows - in the Workspace.
- -
These options arrange the windows in the Workspace in standard ways. - The bottom part of the menu consists of a list of windows and tools that - are currently open in the Workspace. Selecting one of these brings the - corresponding window to the foreground.
- - -|
- Menu Item |
-
- Description |
|
- Cascade |
-
- Arranges the open windows in the Workspace - in a staggered or cascaded sequence. |
|
- Tile Horizontally |
-
- Arranges the open windows in the Workspace - in a horizontal stack. |
|
- Tile Vertically |
-
- Arranges the open windows in the Workspace - in a vertical stack. |
|
- Arrange Icons |
-
- Arranges the minimized icons at the bottom - of the Workspace window. |
|
- Close All |
-
- Closes all the open windows in the Workspace. |
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Menus/Help_menu.gif b/Help/helps/VisualText_Interface/Menus/Help_menu.gif deleted file mode 100644 index 45baf92..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/Help_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/analyzer_menu.gif b/Help/helps/VisualText_Interface/Menus/analyzer_menu.gif deleted file mode 100644 index 5a0738e..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/analyzer_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/analyzer_menu_genrules.gif b/Help/helps/VisualText_Interface/Menus/analyzer_menu_genrules.gif deleted file mode 100644 index fb19b57..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/analyzer_menu_genrules.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/analyzer_view_menu.gif b/Help/helps/VisualText_Interface/Menus/analyzer_view_menu.gif deleted file mode 100644 index 6adf672..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/analyzer_view_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/browser_menu.gif b/Help/helps/VisualText_Interface/Menus/browser_menu.gif deleted file mode 100644 index dc090ba..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/browser_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/edit_menu0610.gif b/Help/helps/VisualText_Interface/Menus/edit_menu0610.gif deleted file mode 100644 index 0f29d62..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/edit_menu0610.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/file_menu_all.gif b/Help/helps/VisualText_Interface/Menus/file_menu_all.gif deleted file mode 100644 index 5b483ff..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/file_menu_all.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/file_menu_analyzer_archive.gif b/Help/helps/VisualText_Interface/Menus/file_menu_analyzer_archive.gif deleted file mode 100644 index 4bc4b02..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/file_menu_analyzer_archive.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/file_menu_recentanalyzers.gif b/Help/helps/VisualText_Interface/Menus/file_menu_recentanalyzers.gif deleted file mode 100644 index b120d1b..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/file_menu_recentanalyzers.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/kb_menu.gif b/Help/helps/VisualText_Interface/Menus/kb_menu.gif deleted file mode 100644 index dff5436..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/kb_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/parse_tree-menu.gif b/Help/helps/VisualText_Interface/Menus/parse_tree-menu.gif deleted file mode 100644 index a798f96..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/parse_tree-menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/tools_dictionary.gif b/Help/helps/VisualText_Interface/Menus/tools_dictionary.gif deleted file mode 100644 index c3e51f2..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/tools_dictionary.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/tools_menu.gif b/Help/helps/VisualText_Interface/Menus/tools_menu.gif deleted file mode 100644 index f163c6e..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/tools_menu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/viewMenu.gif b/Help/helps/VisualText_Interface/Menus/viewMenu.gif deleted file mode 100644 index 4da2baf..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/viewMenu.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Menus/viewMenuToolbars.gif b/Help/helps/VisualText_Interface/Menus/viewMenuToolbars.gif deleted file mode 100644 index ac8ad78..0000000 Binary files a/Help/helps/VisualText_Interface/Menus/viewMenuToolbars.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Popups/Parse_Tree_Popup.htm b/Help/helps/VisualText_Interface/Popups/Parse_Tree_Popup.htm deleted file mode 100644 index c5bb6cf..0000000 --- a/Help/helps/VisualText_Interface/Popups/Parse_Tree_Popup.htm +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - -
The Parse Tree Popup menu is launched by selecting an item in a parse - tree file in the Workspace and right mouse clicking.
- -
The Parse - Tree Menu on the Main Menu describes all of the items in this submenu.
- -
Toggle
- Node Variables button
With View > Node Variable Mode selected - (or the Toggle Node Variables button depressed on the toolbar), placing - the cursor near a parse tree node displays a yellow box with the node's - variables and values, as below.
- -
The Pass File Popup menu is launched by selecting a pass file in the - Workspace and right mouse clicking. Many of the rule-editing actions assume - that rules are in written in standard - rule format.
- -
|
- Menu Item |
-
- Description |
| - | -
- Submenu for adding or removing phrase - element modifiers at the selected line of a pass file. (See below.) |
| - | -
- Submenu for editing special - elements in the current rule. (See below.) |
|
- Comment/Uncomment |
-
- Comments or uncomments the currently selected - line of a pass file. |
| - | -
- Submenu for converting text to rules and for - converting rules to standard format. (See below.) |
|
- Delete Line |
-
- Deletes selected line in a pass file. |
|
- Duplicate - Line |
-
- Duplicates selected line in a file and inserts - it below the current line. |
| - | -
- Submenu for inserting a commonly used rule - components at the current line. (See below.) |
| - | -
- Submenu for inserting a special rule element - below the current line. (See below.) |
|
- Reformat - Standard Rule |
-
- Reformats a rule written in standard - rule format. Cursor must be somewhere within the rule. This accelerator - normalizes rules whose indentation and numbering have been altered by - previous editing operations or by hand-editing. |
| - | -
- Submenu for finding selected item in a pass - file. (See below.) |
|
- Highlight - Matches |
-
- Highlights text in the current input text - file based on the selection in the current pass file. If a rule element - is selected in the pass file, then matches in the parse tree are used - to highlight corresponding portions of the input text. If no item is selected - in the pass file, the user is prompted to supply a rule element. |
|
- Select Analyzer - Pass |
-
- Selects the pass in the analyzer sequence - corresponding to the open pass file. Selected - pass is highlighted in the Ana Tab if Ana Tab is currently open. If - either the Gram Tab or the Text Tab are open, changes the display to the - Ana Tab. |
|
- Run |
-
- Runs the analyzer on the currently selected - input file. (Analyzers can not be run on files with a .log extension.) - Same as Run Button on Workspace - Toolbar and Run in the Analyzer - Menu. |
|
- Save |
-
- Saves selected pass file. Same as Save - in the Edit Menu and the Save - button on the Main Toolbar. |
|
- View Log |
-
- If an intermediate log file is available, - displays log file corresponding to the currently selected pass file. If - intermediate log file is not available, displays the final.log file. |
|
- Close Rest |
-
- Closes all windows in the Workspace except - currently selected one. |
|
- Help on Selection |
-
- Displays Help documentation on selected item. |
|
- NLP++ Help |
-
- Launches VisualText Help documentation for - NLP++™. |
|
- Pass File - Help |
-
- Displays Help for writing rules in pass files. |
The Add/Remove submenu adds - or removes element modifiers for the rule element on the selected line. - See Phrase Element - Modifiers for detailed explanations of the various element actions.
- -
- -
The Change To submenu changes - the name of the selected special rule element to the selected special - rule element name (e.g., _xWILD). See - Special Rule Elements - for detailed explanations of the various element actions.
- -
Accelerators in the Pass File Popup - menu operate on rules laid out with one element per line. The Convert - submenu can format rules to the desired standard form the accelerators - expect.
- - -|
- Menu Item |
-
- Description |
| - | -
- Rewrites single line rule into the Standard - Rule Format. Item is activated if cursor is on a rule whose elements - are written on the same line. (See example below.) |
| - | -
- Converts a string of text into a literal rule. - (See example below.) |
| - | -
- Converts a string of text into a general rule. - (See example below.) |
This editing tool changes a single line rule into a multi-line rule, - with one rule element per line. Breaking up the rule elements like this - makes writing NLP++™ rules easier, since statements that refer to rule - elements refer to them by number, and counting rule elements across a - single line seems more difficult than counting lines.
- -Using One Line to Standard Rule Format - to format a one line rule like the one here:
- -
results in the following rule format:
- -
- -
This menu item converts a string into a literal rule, inserting default - white spaces and rule element modifiers as well as comment symbols and - rule element numbers.
- -Selecting String to Literal Rule for - the text string, "This is a test"
- -
results in the following rule:
- -
Convert String to General Rule - is similar to String to Literal Rule except that rule elements are abstracted - to their variable types. Here's the output on the same example input, - This is a test:
- -
The Insert submenu inserts a - commonly used rule component at the current line. The submenu includes - the most commonly used elements and also a default for directing the output - to a file (Dump Phrase to File). The Header - menu item inserts a comment line into the file.
- -
The Insert Line submenu allows - you to insert rule elements into a rule. The selected rule element is - inserted on the line below the line the cursor is on. The selected rule - elements are _xALPHA, - _xNUM, - _xSTART, - _xWHITE, - and _xWILD.
- -

|
- Menu Item |
-
- Description |
|
- Find Selected - Text |
-
- If item in pass file is highlighted, finds - highlighted item in the pass file. If no item is selected, launches a - dialog box to enter words or phrases to be searched in currently selected - file. Target is highlighted in text. |
|
- Find Again |
-
- Searches for next occurrence of find target - in currently selected file. Next found target is highlighted in text. |
|
- Find in Files |
-
- Launches a dialog box to enter words or phrases - to be searched in multiple files in current analyzer. Search results are - printed in the Find Window. |
|
- Find in Log |
-
- If item in pass file is highlighted, searches - for highlighted item in the log file corresponding to currently selected - pass in the analyzer sequence. If no item is highlighted, launches a dialog - box to enter words or phrases to be searched in the corresponding log - file for currently selected analyzer pass. The log file contains the file - version of the pass output. Results are displayed in the log file in the - Workspace. |
There are a number of popup menus in VisualText™. The main popup menus - are provided for the following: Ana Tab, Gram - Tab, Text Tab, Text Files, - Pass Files, Parse Trees - and the KB Editor. To see a description of each - of these menus, click on the titles below.
- -The Ana Tab Popup controls activity in the analyzer sequence. To bring - up this menu, select a pass in the Ana Tab and right mouse click.
- -
- -
The Gram Tab Popup controls actions on the Gram Hierarchy. To bring - up this menu, select a concept in the - Gram Hierarchy and right mouse click.
- -
- -
The Text Tab Popup organizes functions for operation in the Text Tab. - To bring up this menu, select any folder or text file in the Text Tab - and right mouse click.
- -
The Text File Pop controls actions to a selected text file in the Workspace. - To bring up this menu, select the text file in the Workspace and right - mouse click.
- -
The Pass File Popup controls functions for editing the rules contained - within the pass file. To open this menu, open a pass file in the Workspace - and right mouse click.
- -
- -
The Parse Tree Popup controls actions to an item in a parse tree display. - To bring up this menu, select an item in a parse tree display in the Workspace - and right mouse click.
- -
The KB Editor Popup controls actions to items in the Knowledge Base. - To bring up this menu, right click in the body of the KB Editor.
- -
.
- -- - - - diff --git a/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add.gif b/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add.gif deleted file mode 100644 index 42ef061..0000000 Binary files a/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add_TopLevel.gif b/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add_TopLevel.gif deleted file mode 100644 index 9b5b4ef..0000000 Binary files a/Help/helps/VisualText_Interface/Popups/TextTabPopup_Add_TopLevel.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Popups/Text_File_Popup.htm b/Help/helps/VisualText_Interface/Popups/Text_File_Popup.htm deleted file mode 100644 index 4e91017..0000000 --- a/Help/helps/VisualText_Interface/Popups/Text_File_Popup.htm +++ /dev/null @@ -1,971 +0,0 @@ - - - - - - - - - - -
The Text File Popup menu is launched by selecting a text file in the - Workspace and right mouse clicking.
- -
|
- Menu Item |
-
- Description |
|
- Find Selected - Text |
-
- Searches for highlighted text in file. If - no text is highlighted, launches a dialog box to enter search term. Found - search term is highlighted in text. |
|
- Find Again |
-
- Searches for next occurrence of find target - in currently selected file. Next found target is highlighted in text. |
|
- Find in Files |
-
- Searches for highlighted text across multiple - files in the current analyzer. If - no word or phrase is highlighted in file, launches a dialog box to enter - search terms. Search results are printed in the Find Window. |
|
- Find in Log |
-
- Searches for highlighted text in log files. - If no word - or phrase is highlighted in file, launches a dialog box to enter search - terms. If an intermediate log file is available, search is performed in - the log file corresponding to the currently selected pass in the analyzer - sequence. If intermediate log file is not available, the final.log file - is searched. |
|
- Close Rest |
-
- Closes all windows in the Workspace except - currently selected one. |
| - | -
- Submenu to perform dictionary related functions. - (See below.) |
|
- Generate - Rule |
-
- Automatically creates a rule from the currently - selected text. Appends rule to the currently selected pass file in the - Ana Tab. Generate Rule only works if you have previously run the analyzer - on the text with the "Generate Logs" toggle turned on |
|
- Run |
-
- Runs the analyzer on the currently selected - input file. (Note: analyzers can not be run on files with a .log extension.) - Same as the Run Button on Workspace - Toolbar and selecting Run from - the Analyzer Menu. |
|
- Sort Unique - Text |
-
- Sorts words in the currently selected text - file in ascending alphabetic order. Multiple occurrences of words are - discarded. Results are displayed in the currently selected text file. - Useful in building sample files. |
| - | -
- Submenu for accessing VisualText tools. (See - below.) |
| - | -
- Submenu for viewing parse tree, output - files and parse tree of selected text. |
|
- Wrap Text |
-
- Launches a dialog to specify the maximum number - of characters per line, then "wraps" the text lines to that - limit. |
|
- Save |
-
- Saves currently selected file in the Workspace. |
|
- Save As |
-
- Saves currently selected file in the Workspace - with a new name. Refresh - the Text Tab to see the new file. |
The Dictionary menu option allows you to perform dictionary related - functions.
- -
|
- Menu - Item |
-
- Description |
|
- Add Word |
-
- Adds the highlighted word in a file to the - dict hierarchy of the Knowledge Base. Words can only be added to the dict - hierarchy one at a time. Only - single words can be added. If the word already exists in the hierarchy - a message is written to the Log Window. Log - message is also written indicating which word is added. |
|
- KB Attributes |
-
- Highlighting a word in the text file and selecting - KB Attributes launches the Attribute - Editor. Attribute - Editor is only launched if highlighted word exists in the dict hierarchy - of the Knowledge Base. |
|
- Lookup |
-
- Displays list of online dictionaries specified - in the Dictionary - Lookup Preferences tab. Selecting - an option in the Lookup menu starts a search in the online dictionary - source. See - Dictionary Lookup for - more information on using this tool. |
- -

|
- Menu Item |
-
- Description |
| - | -
- Displays the ASCII - Table. ASCII Table displays the decimal and hexadecimal numbers and - their corresponding ASCII characters. |
|
- Character Viewer |
-
- Displays the Character - Viewer for the selected file. Character Viewer shows the line number, - cumulative count of total characters seen per line, characters on a line, - and ASCII characters for each line of text in selected file. Under each - line is the hexadecimal value of each character above it. |
| - | -
- Activates the Dictionize - Tool. |
|
- |
-
- Launches the Email - Tool. Email Tool enables sending email directly from the VisualText - interface. |
|
- Hex Viewer |
-
- Launches the Hex - Viewer. |
| - | -
- Activates the Jumble - Tool. This - tool jumbles the letters in words in a text file. This - tool is useful when looking for structural clues in a text, since it removes - distracting content. Paragraph - and sentence structure are preserved. |
| - | -
- Activates the Mask - Tool. This - tool takes alphabetic content of a text with strings of the single letter - 'a', but leaves the form, the non-alphabetic structure, including punctuation - and white spaces. This tool is useful when looking for structural clues - in a text, since it removes distracting content. |
|
- Text File Info |
-
- Displays the Text - File Info dialog. This tool provides statistics about the selected - text file, including creation date, character, word and line counts. |

|
- Menu - Item |
-
- Description |
|
- Parse Tree |
-
- Displays the full parse tree of a parsed document - in the Workspace. This includes character position and white spaces in - the document. |
|
- Output File |
-
- Displays output.txt file associated with parsed - input document in the Workspace. |
| - | -
- Displays parse tree for selected portion in - a text file in the Workspace. |
- -
There are three tabs in the Tab Window, - Ana, Gram, and Text
- -
The Ana Tab shows the analyzer sequence. This is where you control the - text analyzer sequence, passes, and pass files. You can operate on the - objects in the Ana Tab with buttons on the Tab - Toolbar and with the Ana Tab Popup - Menu.
- -
There are two types of passes:
- -system
- pass
-user created pass
Currently, the only system pass available is the tokenize - pass. System passes are identified by the rectangle icon. System - passes cannot be modified. The tokenize executes first, traversing - the input text to convert it to a structure called a parse - tree. Unlike user created passes, the tokenize and pass does not - have an associated pass file.
- - - -User created passes are added after the default system pass. User created - passes can be identified by the DNA chain icon. The two types of user - created passes are Pattern and - Recursive. A pass in the analyzer - sequence that is recursive is indicated by an R - in the analyzer sequence.
- -A region of passes that have been generated automatically is called - a stub region. The stub region - is delimited by two red markers (labeled stub_NAME and end_NAME) in the - analyzer sequence.
- -- -
The Gram Tab is used to construct a concept (or sample) hierarchy and - to sample data from input files to the concept hierarchy. You can operate - on the objects in the Gram Tab by selecting them and using toolbar buttons - and the Gram Tab Popup Menu.
- -
The Gram Tab can have five types of concepts:
- -The top level concept is the stub concept. It is identified by the DNA - chain icon. The stub concept is associated with a region of automatically - generated passes in the analyzer sequence. Folder and rule concepts can - be direct descendants of stub concepts.
- - - -The second level concept is the folder concept. This - concept uses the folder icon. Folder concepts help organize related - sets of samples. Folder and rule concepts can be direct - descendants of folder concepts.
- - - -The third level concept is the rule concept. Rule - concepts are identified by the right-pointing arrow. Rule concepts - own a set of related samples, from which the rule generator will generalize, - merge, and generate rules. Label concepts and sample - concepts can be direct descendants of rule concepts.
- - - -The fourth concept type is the label concept. Label - concepts are identified by the triangle icon. Label concepts hold - subsamples of larger samples. Label concepts can only be direct descendants - of rule concepts.
- - - -The final concept type is the sample concept. Samples - are identified by a box icon. A sample concept stores a single - sample or subsample. Sample concepts are placed under rule concepts and - label concepts. (Note: in the KB, sample concepts are not directly in - the hierarchy, but are implemented as phrase nodes owned by rule concepts - and label concepts.)
- -- -
The Text Tab is where you organize and view input and output text data - files. You can operate on the objects in the Text Tab by selecting them - and using the Text Tab Popup Menu, and with various toolbar buttons.
- -
The Text Tab contains folders and files. When a text file has been analyzed, - it will have a checkmark on it. Html files can be distinguished from the - other text files by the globe icon.
- -- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Browser_Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Browser_Toolbar.htm deleted file mode 100644 index 8f8c174..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Browser_Toolbar.htm +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - - - - -
![]()
The Browser Toolbar provides access to the World - Wide Web and various controls for browsers.
- - -|
- Button |
-
- Name |
-
- Description |
|
-
|
-- | -
- Copies the URL name and html file to the Text - Tab. Function is enabled when a browser is selected in the Workspace. |
|
-
|
-- | -
- Opens a new browser window. If - a browser is already open, new browser opens to same location as open - browser. The - desired Web address can be typed directly into the Location Input Panel. |
|
-
|
-- | -
- Stops loading a Web page. |
|
-
|
-- | -
- Loads previous Web page (if there is one) - in the history list. Function is disabled if no Urls are in the history - list. |
|
-
|
-- | -
- Loads next Web page (if there is one) in the - history list. Function is disabled if no Urls are in the history list. |
|
-
|
-- | -
- Input panel to open URL. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Debug_Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Debug_Toolbar.htm deleted file mode 100644 index ffc2ad6..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Debug_Toolbar.htm +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - - - - -
![]()
The Debug Toolbar provides controls to display parse - trees, intermediate files and output files.
- - -|
- Button |
-
- Name |
-
- Description |
|
-
|
-- | -
- Maintains coordinated sets of documents. For - example, when the user runs the analyzer, its corresponding output and - tree windows are updated automatically. Similarly when selecting passes - in the Ana Tab, Page Mode activates the Next Text and Previous Text buttons. |
|
-
|
-- | -
- Displays previous input text file according - to the ordering in the Text Tab. Works in Page Mode to automatically update - the open documents associated with the input text. |
|
-
|
-- | -
- Displays the next input text file according - to the ordering in the Text Tab. Works in Page Mode to automatically update - the open documents associated with the input text. |
|
-
|
-- | -
- Displays the currently selected input data - file in the Workspace. |
|
-
|
-- | -
- Displays Web page for the HTML file selected - in the Text Tab. |
|
-
|
-- | -
- Displays the currently selected pass file - in the analyzer sequence in the Workspace. |
|
-
|
-- | -
- Displays the full parse tree of a parsed document - in the Workspace. This includes character position and white spaces in - the document. |
|
-
|
-- | -
- Displays the concept tree of a parsed document - in the Workspace. |
|
-
|
-- | -
- When selected, enables the display of node - variables in the parse tree. |
|
-
|
-- | -
- Displays the output files associated with - a parsed document in the Workspace. When there are multiple files, the - pulldown tab to the right of the button lists available files. |
|
-
|
-- | -
- Displays the output.txt file associated with - parsed input document in the Workspace. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Main_Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Main_Toolbar.htm deleted file mode 100644 index c873c72..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Main_Toolbar.htm +++ /dev/null @@ -1,694 +0,0 @@ - - - - - - - - - - -
![]()
The Main Toolbar provides access to commonly used - functions such as opening, closing and saving files. It also contains - the controls for toggling the Main Windows.
- - -|
- Button |
-
- Name |
-
- Description |
|
-
|
-- | -
- Creates a new file and displays it in the - Workspace window. |
|
-
|
-- | -
- Opens a file and displays it in the Workspace. |
|
-
|
-- | -
- Saves currently selected file in the Workspace. |
|
-
|
-- | -
- Saves all unsaved files in the Workspace. |
|
-
|
-- | -
- Deletes selected object in a Workspace file. |
|
-
|
-- | -
- Copies selected object to the clipboard. |
|
-
|
-- | -
- Pastes object from the clipboard at insertion - point in currently selected file. |
|
-
|
-- | -
- Prints currently selected file in the Workspace. |
|
-
|
-- | -
- Launches Find - in Files dialog box to search for items across multiple files. File - type can be specified. Search results displayed in the Find - Window. |
|
-
|
-- | -
- Searches for the last occurrence of an item - in the find dialog. |
|
-
|
-- | -
- Searches for the next occurrence of an item - in the find dialog. |
|
-
|
-- | -
- Toggles the visibility of the Tab Window. - By default, the Tab Window is located in the middle left portion of the - interface. |
|
-
|
-- | -
- Toggles the visibility of the Log Window. - By default, the Log Window is located in the bottom left portion of the - interface. |
|
-
|
-- | -
- Toggles the visibility of the Find Window. - By default, the Find Window is located in the bottom right portion of - the interface. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Tab_Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Tab_Toolbar.htm deleted file mode 100644 index ddd1ebb..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Tab_Toolbar.htm +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - -
![]()
The Tab Toolbar presents controls for some objects in the Tab Window, - and is active when the Ana Tab, Gram Tab or Text Tab are displayed.
- - -|
- Button |
-
- Name |
-
- Description |
|
-
|
-- | -
- Moves selected pass in the Ana Tab or concept - in the Gram Tab up one position. |
|
-
|
-- | -
- Moves selected pass in the Ana Tab or concept - in the Gram Tab down one position. |
|
-
|
-- | -
- Deletes selected pass in the Ana Tab, concept - in the Gram Tab or text file in Text Tab. |
|
-
|
-- | -
- Displays the name and path of currently selected - file in the Text Tab. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Toolbar.htm deleted file mode 100644 index c11f25d..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Toolbar.htm +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - -
The toolbars on the VisualText™ interface provide quick and easy access - to the most commonly used commands. You can move the toolbars to any location - on the interface. You can also open and close any combination of them - to suit your needs.
- -To move a toolbar, left click on the two bars on the left edge of the - toolbar and drag it to the desired location. You can also move the toolbar - by putting the pointer on the edge of the toolbar in an area that doesn't - display a button or pulldown menu.
- -When a toolbar is selected it will appear indented.
- -To see a description of each of these toolbars, click - on the toolbar titles below.
- -![]()
- -
![]()
- -
![]()
- -
![]()
- -
![]()
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/Workspace_Toolbar.htm b/Help/helps/VisualText_Interface/Toolbars/Workspace_Toolbar.htm deleted file mode 100644 index d8a9aeb..0000000 --- a/Help/helps/VisualText_Interface/Toolbars/Workspace_Toolbar.htm +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - - - - -
![]()
The Workspace Toolbar provides access to the analyzer, - knowledge base and controls various functions with the display of parse - tree information.
- - -|
- Button |
-
- Name |
-
- Description |
|
-
|
-- | -
- Launches the Attribute - Editor |
|
-
|
-- | -
- Launches the KB - Editor. |
|
-
|
-- | -
- Moves a selected concept in the concept hierarchy - 'up' one position. |
|
-
|
-- | -
- Moves selected concept in the concept hierarchy - down one position. |
|
-
|
-
-
-
|
-
- Makes changes to the KB permanent. Changes - made during a VisualText™ session are stored in memory. If KB is not saved, - all changes made are lost upon exiting |
|
-
|
-- | -
- Compiles the Knowledge Base. Action results - in the creation of a KB.DLL. Preferences to load the compiled Knowledge - Base can be set in Preferences from the File Menu. The KB.DLL library - can be used with either an interpreted or compiled VisualText-built analyzer. |
|
-
|
-- | -
- Turning on this toggle, followed by loading - an analyzer, results in compiling the analyzer while it is being loaded. - This results in the creation of a RUN.DLL library, which can be called - from an external program. Currently, VisualText does not load the compiled - analyzer library. The Compile Analyzer toggle is turned off after an analyzer - is loaded. |
|
-
|
-- | -
- Generates rules only for those rule concepts - in the Gram Tab that have the Dirty - attribute set. This attribute is set by the system, for example, when - new sample data is added to the concept. This is a "quick-and-dirty" - rule generation that most often works well, but may not always agree with - the Generate Rules > All option. It is used for rapid prototyping. - See Mark for - Generation in the Gram Tab Popup Menu, where the Dirty attribute can - be set. |
|
-
|
-- | -
- Does a Generate Rules All, followed by a Run - on the currently selected input. |
|
-
|
-- | -
- Runs the analyzer on the currently selected - input file. (Analyzers can not be run on files with a .log extension.) |
|
-
|
-- | -
- Runs the analyzer file on the next file in - the directory after the currently selected file. |
|
-
|
-- | -
- Stops the current analyzer. |
|
-
|
-- | -
- When selected, enables highlighting of words - or phrases in a text file matching selected pass in the Ana Tab or selected - concept in the Gram Tab. Must be enabled before an analyzer is run over - text. This tool allows you to quickly see whether and where a rule is - applying. |
|
-
|
-- | -
- When selected, enables generation of intermediate - logs for each pass in the analyzer sequence. Must be enabled before an - analyzer is run over text. This function gives you the ability to display - and inspect the intermediate parse trees, one for each pass, and the final - tree. It may slow the parse substantially in many-pass analyzers, since - all intermediate trees are written to disk. If the function is not enabled, - only the final tree is available for display. |
|
-
|
-- | -
- Enables the display of details from the loading - of the analyzer. Results are displayed in the Log Window. |
|
-
|
-- | -
- Instructs VisualText to analyze groups of - files in an efficient mode. VisualText does not save intermediate and - output files in batch mode. The text analyzer must explicitly create a - location for output that is to be retained in batch mode. The NLP++™ function - called batchstart() enables a text analyzer to check when the first text - in a batch run is being analyzed. |
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Toolbars/browser_toolbar.gif b/Help/helps/VisualText_Interface/Toolbars/browser_toolbar.gif deleted file mode 100644 index 267e209..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/browser_toolbar.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/browser_toolbar_locpanel.gif b/Help/helps/VisualText_Interface/Toolbars/browser_toolbar_locpanel.gif deleted file mode 100644 index 97e2702..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/browser_toolbar_locpanel.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/debug_toolbar0614.gif b/Help/helps/VisualText_Interface/Toolbars/debug_toolbar0614.gif deleted file mode 100644 index 024a5ad..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/debug_toolbar0614.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/mainToolbar.gif b/Help/helps/VisualText_Interface/Toolbars/mainToolbar.gif deleted file mode 100644 index b42b5ea..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/mainToolbar.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/tab_toolbar.gif b/Help/helps/VisualText_Interface/Toolbars/tab_toolbar.gif deleted file mode 100644 index 12acf69..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/tab_toolbar.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/tab_toolbar_locpanel.gif b/Help/helps/VisualText_Interface/Toolbars/tab_toolbar_locpanel.gif deleted file mode 100644 index adae7d2..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/tab_toolbar_locpanel.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Toolbars/workspaceToolbar.gif b/Help/helps/VisualText_Interface/Toolbars/workspaceToolbar.gif deleted file mode 100644 index 89bf674..0000000 Binary files a/Help/helps/VisualText_Interface/Toolbars/workspaceToolbar.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Tools/Attribute_Editor.htm b/Help/helps/VisualText_Interface/Tools/Attribute_Editor.htm deleted file mode 100644 index a38e0db..0000000 --- a/Help/helps/VisualText_Interface/Tools/Attribute_Editor.htm +++ /dev/null @@ -1,914 +0,0 @@ - - - - - - - - - - -
The Attribute Editor allows the user to edit the attributes of a concept - or node in the Knowledge Base. An - attribute consists of a key (or - slot, or less accurately, a name) and zero or more values. - A value can be a string, an integer, or another concept. Each attribute - can have multiple values, each with a distinct type.
- -Version 1.4 of VisualText introduces enhancements to the Attribute Editor. - Concepts - can now be viewed and edited, as values of attributes. Navigation - of the knowledge base from within the Attribute Editor has been made more - convenient.
- -The Attribute Editor can be launched from several places within VisualText™.
- The
- easiest is to use the Attribute Editor button
on the Workspace
- Toolbar.
Selecting Attributes from the Gram - Tab Popup Menu, the Ana Tab Popup - Menu, the Phrase Tool, - and the Text Tab Popup Menu will - launch the Attribute Editor. You - can also access the Attribute Editor from the KB - Menu.
- -
The Attribute Editor is used to select attributes and/or values for - the selected concept or node. Here is a list of the options in the Attribute - Editor.
- - -|
- Item |
-
- Description |
|
- (combo box) |
-
- The combo box determines the data type of - the attribute value to be added or edited. Selecting - an existing attribute and value will automatically update the combo box - to the type of the value already present. Three - knowledge base data types are currently supported: string (A), concept - (C), and numeric (N). |
|
- Add Attribute |
-
- Create a new line in the display in which - you can enter the name for the attribute. You must enter the first value - for the attribute or it defaults to "New Value". |
|
- Add Value |
-
- Create a new line which represents an additional - value for the selected attribute. |
|
- Delete |
-
- If there is only one value, delete the value - and attribute pair. If there are multiple values, delete the value on - the selected line. |
|
- no attrs |
-
- Move to a concept having no attributes. |
|
- Browse |
-
- (1) If a concept-valued attribute line is - selected, checking the Browse box highlights the concept within the KB - Editor window. (2) If - the Browse button is checked, then clicking on a value field and then - on a concept in the KB Editor selects that concept as the new value of - the attribute. This - enables convenient selection of a concept as the value of an attribute. |
|
- Quick - Edit >> |
-
- Expand the Attribute Editor to include the - Quick Edit Table. Commonly - used attribute-value pairs can be listed in the Quick Edit Table to make - adding and/or deleting attributes and attribute-value pairs easier. When - Quick Edit Table is open, selecting button closes the Quick Edit Table - display. (See - below.) |
|
-
|
-
- Select previous or next concept. |
|
- (up down arrows) |
-
- Select the parent or child concept. |
|
-
|
-
- Launch the KB Editor if it is not already - open. |
|
-
|
-
- Search an online dictionary for the concept - currently being viewed in the Attribute Editor. The - panel next to the dictionary icon can be used to specify which online - dictionary to access. (For - more information on setting dictionary access preferences, see the Dictionary Lookup - preferences tab which can be accessed from the File Menu under Preferences.) |
|
-
|
-
- Search input panel. Searches - for word in the dict hierarchy. If - item exists in the dict hierarchy, the attributes for word are displayed. - The search - input panel locates words - in the concept:sys:dict hierarchy only. |
|
- Add |
-
- Add a word concept to the dict hierarchy. |
|
-
|
-
- Delete a word concept from the dict hierarchy. |
|
-
|
-
- Search button. Start - search for item entered in input panel. |
|
- Done |
-
- Close the Attribute Editor. |
An attribute may have multiple values. For example, the attribute named - "algo" may have values "pat", "hello there", - and "170224929." By selecting a line and clicking Add Value, - successive values can be added. One can even mix the types of values (numeric, - "N", and string, "A") arbitrarily.
- -The Attribute Editor is now smart enough to be able to treat "123" - as both a string or numeric type, depending on the type chosen in the - combo box. Similarly, - "concept:gram" may represent a concept in the KB or a string, - depending on the type chosen in the combo box.
- -Concept naming in the attribute editor looks like concept:child:grandchild:greatgrandchild - and so on. The - concept named "concept" specifies the root of the KB hierarchy, - and colons (':') separate each successive child.
- - -|
- Notes: - (1) The - "name" of an attribute is actually a concept in the KB, not - merely a string. (2) - There is currently no way to specify a colon as part of the name of a - concept, in the attribute editor. |
|
- WARNING: - Editing the gram or sys - hierarchies manually can easily corrupt the KB, so please make a backup - copy of your analyzer project before experimenting. The - Gram Tab is the safest way to edit the Gram hierarchy. |
The Quick Edit Table is used to store commonly used attribute-value - pairs. Attributes - can be added to the selected concept by double-clicking the attribute-value - line in the Quick Edit Table or by selecting the line in the table and - clicking on the << KB Edit - button. Add - in the Action column indicates the attribute-value pair will be added - to the concept. Once - a concept is added, the Action column changes to Del (for delete). Double-clicking - on a Del line will delete the attribute-value pair from the concept.
- -
|
- Item |
-
- Description |
|
- Attribute |
-
- Input box to add attribute to Quick Edit Table. - Added attribute - appears in the Attribute column. |
|
- Value |
-
- Input box to add value for given attribute - to Quick Edit Table. Added - value appears in the Value column. |
|
- Add |
-
- Adds attribute-value pair to the Quick Edit - Table. |
|
- Remove |
-
- Removes selected attribute-value pair from - the Quick Edit Table. To - remove multiple attribute-value pairs at the same time, hold down the - shift key and select the attribute-value lines in the Quick Edit Table - you want to delete. |
|
- Update |
-
- Updates changes made to attribute-value pair - in the Quick Edit Table. |
|
- Help |
-
- Launches instructions on using the Quick Edit - Table. |
|
- << KB Edit |
-
- Assigns selected attribute-value pair to the selected concept. To assign - multiple attribute-value pairs at the same time, hold down the shift key - and select the appropriate attribute-value lines in the Quick Edit Table. |
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/EmailTool.gif b/Help/helps/VisualText_Interface/Tools/EmailTool.gif deleted file mode 100644 index 13b124a..0000000 Binary files a/Help/helps/VisualText_Interface/Tools/EmailTool.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Tools/HexViewer.gif b/Help/helps/VisualText_Interface/Tools/HexViewer.gif deleted file mode 100644 index 469eb8c..0000000 Binary files a/Help/helps/VisualText_Interface/Tools/HexViewer.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Tools/KB_Editor.htm b/Help/helps/VisualText_Interface/Tools/KB_Editor.htm deleted file mode 100644 index 8d146e5..0000000 --- a/Help/helps/VisualText_Interface/Tools/KB_Editor.htm +++ /dev/null @@ -1,946 +0,0 @@ - - - - - - - - - - -
The KB Editor displays the Knowledge - Base and allows you to manipulate portions of it.
- -The KB Editor can be accessed by selecting the KB
- Editor button
on the Workspace Toolbar, or by selecting
- KB Editor from the KB Menu. You
- can also access the KB Editor from the Attribute
- Editor.

The KB Editor displays a hierarchy of concepts. The major organization - of this Conceptual Grammar™ Knowledge Base Management System is a hierarchy - of concepts.
- -concept is the root of the concept - hierarchy. It is the topmost concept in the knowledge base. The - child concept gram is where the - Sample Hierarchy (or Gram Hierarchy) is implemented. Other VisualText™ - and KB internals are stored in sys. - The dictionary hierarchy (dict), - the analyzer sequence and a mirror for input files are stored under sys.
- -Concept icons in the KB Editor are color-coded. You - can tell several things about a concept just by looking at the color of - the icon.
- -
|
- Color |
-
- Description |
|
- Blue |
-
- Concept in selected. |
|
- Yellow |
-
- Concept has an associated phrase. |
|
- Grey |
-
- Concept has attributes |
|
- Clear (hollow) |
-
- Concept has no attributes. |
- -
The KB Editor is used to modify current concepts and to add new concepts - to the concept hierarchy when building representation schemes. The existing - hierarchies may be modified, but it is not recommended to edit system - attributes of concepts. Also, note that the gram - and sys subhierarchies - should not be hand-edited using the KB Editor.
- -The Attribute Editor can be used to manually add or modify attributes. - However, - whenever feasible users should edit concepts using the Gram - Concept Properties dialog. The Gram Concept Properties dialog is accessed - by selecting Properties from the Gram - Tab Popup Menu.
- -To edit using the KB Editor, select a node and right click to bring - up the KB Editor Popup Menu:
- -
|
- Item |
-
- Description |
|
- Attributes |
-
- Launches the Attribute - Editor dialog and displays the attributes belonging to the selected - concept in the KB. User has option to delete, add or change names of attributes - and values. |
|
- Display as - Root |
-
- Displays selected concept as the root of the - concept hierarchy. |
|
- Display Entire - KB |
-
- Displays the entire knowledge base starting - at root. |
|
- Display Parent - as Root |
-
- Displays parent of concept currently displayed - as root. |
| - | -
- Launches the Phrase Tool. Displays the phrase, if any, of a selected - concept in the Knowledge Base. User can add edit or delete nodes of a - concept's phrase. (See below.) |
|
- Refresh |
-
- Refreshes the KB Editor display. |
|
- Add Concept(s) |
-
- Adds a new concept under the selected concept. |
|
- Add Node |
-
- Adds a new node to the concept's phrase. |
|
- Delete |
-
- Deletes the selected concept and its subtree. |
|
- Delete Children |
-
- Deletes the subtree of a selected concept, - but retains the concept itself. |
| - | -
- Submenu for saving and loading modular KB - files. (See - below.) |
|
- Save |
-
- Saves the KB. |
|
- Note: - To prevent users from inadvertently corrupting the knowledge base, analyzers - are loaded in KB Safe Edit Mode. - With KB - Safe Edit Mode enabled, Add Concept, - Add Node, Delete, - Delete Children options on the - KB Editor Popup Menu are not available when either the gram concept or - the sys concept is selected. You - may disable KB Safe Edit Mode by unchecking the KB - Safe Edit Mode box on the General Preferences tab. Users - are advised to create backups before using the KB Editor when KB Safe - Edit Mode is turned off. |
In the Conceptual Grammar knowledge base, each concept may have one - associated phrase. A phrase consists - of nodes, which are basically - concepts that are not attached directly to the KB hierarchy.
- -A phrase is a convenient way to embed sequential - information of any type in the knowledge base. For example, if you browse - the concept > gram subhierarchy - of the KB, you will find that the sample hierarchy stores user-highlighted - samples as phrases (each sample is actually a node - of the phrase belonging to a rule concept).
- -The Phrase Tool lets you view and edit the phrase - that belongs to the currently selected concept. Each line in the Phrase - Tool represents one node. Only the name of the node is visible, but double-clicking - a node or selecting the Attributes button brings up the Attribute Editor - for the current node.
- -
|
- Item |
-
- Description |
|
- Delete |
-
- Deletes the selected node. |
|
- Attributes |
-
- Launches the Attribute Editor for the selected - node. |
|
- Add |
-
- Launches the Add Node dialog to add a node - to the current phrase. (See below.) |
|
-
|
-
- Moves the selected node up one position in - the phrase. |
|
-
|
-
- Moves the selected node down one position - in the phrase. |
|
- Done |
-
- Saves changes to the phrase and closes the - Phrase dialog box. |
|
- Cancel |
-
- Cancels the changes to the phrase. |
|
- Note: - If the analyzer has been loaded in KB - Edit Safe Mode, the only - option available in the Phrase Tool when viewing gram or sys concepts - is the Attributes button. |
- -
The Add Node - dialog appears when adding a node to a concept's phrase, either from the - Phrase Tool or the KB Editor Popup Menu > Add Node menu item. To add - a node, you merely specify a name for it. You may edit an existing node's - attributes with the Attribute Editor.
- -
|
- Item |
-
- Description |
|
- Load |
-
-
|
|
- Save |
-
-
|
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Mask.gif b/Help/helps/VisualText_Interface/Tools/Mask.gif deleted file mode 100644 index 9d7bd8c..0000000 Binary files a/Help/helps/VisualText_Interface/Tools/Mask.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Tools/TextFileInfo.gif b/Help/helps/VisualText_Interface/Tools/TextFileInfo.gif deleted file mode 100644 index eac0662..0000000 Binary files a/Help/helps/VisualText_Interface/Tools/TextFileInfo.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Tools/Tools_ASCII_Table.htm b/Help/helps/VisualText_Interface/Tools/Tools_ASCII_Table.htm deleted file mode 100644 index 4703c11..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_ASCII_Table.htm +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - -
The ASCII Table is used to display the decimal and hexadecimal numbers - and their corresponding ASCII characters.
- -The ASCII Table can be displayed from several places within VisualText. - It can - be accessed from the main Tools Menu, - the Text Tab Popup Menu under - Tools, and from the Tools submenu in the Text - File Popup Menu.
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Tools_Character_Viewer.htm b/Help/helps/VisualText_Interface/Tools/Tools_Character_Viewer.htm deleted file mode 100644 index 2a762bf..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_Character_Viewer.htm +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - -
The Character Viewer Tool is used to get information on lines of text - and the characters used in each line of text.
- -The Character Viewer Tool can be displayed from several places within - VisualText. It - can be accessed from the main Tools Menu, - the Text Tab Popup Menu under - Tools, and from the Tools submenu in the Text - File Popup Menu.
- -The Character Viewer Tool can be launched for an open file in the Workspace. - If no file - is open in the Workspace, an Open dialog is launched to navigate to the - desired text file.
- -The Character Viewer Tool shows the line number, a cumulative count - of total characters seen per line, the characters on a line, and the ASCII - characters for each line of text in selected file. Under each line is - the hexadecimal value for each character above it.
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Tools_DictionaryLookup.htm b/Help/helps/VisualText_Interface/Tools/Tools_DictionaryLookup.htm deleted file mode 100644 index 12a2855..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_DictionaryLookup.htm +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - -
The Dictionary Lookup Tool allows you to access and search specified - online dictionaries. It - can be a handy tool when doing lexical work. You - can feed Dictionary Lookup a list of words or phrases and it will return - html files containing the results for the search for each of the words - on the list. The - html files are placed in folders in the Text Tab. You - can also use Dictionary Lookup as a reference source to search for words - in the online dictionary directly from VisualText.
- -Dictionary Lookup can be accessed from several places within VisualText. - It can - be accessed from the main Tools Menu, - the Text Tab Popup Menu under - Tools, and from the Tools menu in the Text - File Popup Menu. Dictionaries can also - be accessed from the Attribute Editor. -
- -Access to the online ontology WordNet is provided by default. To - add other online dictionaries to Dictionary Lookup, you must specify the - dictionary path in the Dictionary - Lookup tab in VisualText preferences located under the File Menu. - For more - information on creating path names to online dictionary sources, see URLs for Dictionary - Lookup.
- - -|
- Note: - Access to WordNet relies on a fixed webpage CGI to WordNet. If the WordNet - page changes, the path for WordNet must be changed in the preferences - dialog. |
- -
To create dictionary files from a word - list:
- -Dictionary Lookup expects a file that consists of a list of words, one - per line with no spaces after the word.
- -Select the file - in the Text Tab.
Right-click and select Dictionary - > Lookup from the Text Tab - Popup, and choose the online dictionary from the list. Html - files for each of the words on the list are created in a folder in the - input directory. The - name of the folder is filename_DictionaryName.
To use Dictionary Lookup to find words - in an online dictionary:
- -Highlight a word - in an open text file in the Workspace. (If - you do not highlight a word, you will be prompted with a dialog box.)
Right-click and select Dictionary - > Lookup from the Text File - Popup, and choose the online dictionary from the list. The - word is displayed in a browser window.
Dictionary - Lookup Preferences
- - - -- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Tools_Dictionize.htm b/Help/helps/VisualText_Interface/Tools/Tools_Dictionize.htm deleted file mode 100644 index 935fa92..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_Dictionize.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - -
The Dictionize Tool breaks up a file of alphabetized words or phrases - into a set of word files. The - Dictionize Tool is a batch tool that can be used when adding new lexical - items to the knowledge base.
- -The Dictionize Tool can be accessed from several places within VisualText. - It can - be accessed from the Text Tab Popup - Menu under Tools, and from the Tools submenu in the Text - File Popup Menu.
- -The Dictionize Tool expects an alphabetized list of words or phrases. - There should - only be one word or phrase per line.
- -To use the Dictionize Tool:
- -Select the file containing the words or phrases - in the Text Tab.
Right-click and select - Tools > Dictionize. - A set of - folders and files corresponding to the indexes in the KB dictionary hierarchy - are created in the same folder as the text file. (You - can also open the file in the Workspace and select Tools > Dictionize - from the right-click menu.)
- -
- -
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Tools_Email_Tool.htm b/Help/helps/VisualText_Interface/Tools/Tools_Email_Tool.htm deleted file mode 100644 index f814625..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_Email_Tool.htm +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - -
The Email Tool enables you to send email directly from the VisualText - interface.
- -The Email Tool can be accessed from several places within VisualText. - It can - be accessed from the main Tools Menu, - the Text Tab Popup Menu under - Tools, and from the Tools submenu in the Text - File Popup Menu.
- -Preferences for the Email Tool can be set under the Email Tab in VisualText - preferences under the File Menu. SMTP - Server and From Email must be set before the Email Tool can be used.
- -When the Email Tool is selected, the content of the selected file is - automatically filled into the body of the message.
- -
|
- Menu Item |
-
- Description |
|
- To: |
-
- Field to enter email recipient. If text file - contains "to: person@emailaddress" field is automatically entered - with information from file. |
|
- Subject: |
-
- Field to enter email subject. If text file - contains "subject: subject of email" field is automatically - entered with information from file. |
|
- Email List - File: |
-
- Allows user to browse to a folder of email - files to be sent. |
|
- << |
-
- Allows user to move to previous file in the - email folder. |
|
- >> |
-
- Allows user to move to the next file in the - email folder. |
|
- Send Current |
-
- Sends the current email. |
|
- Send All |
-
- Emails all the files in the current folder. |
|
- Done |
-
- Closes the Email Tool display. |
- - - - diff --git a/Help/helps/VisualText_Interface/Tools/Tools_Hex_Viewer.htm b/Help/helps/VisualText_Interface/Tools/Tools_Hex_Viewer.htm deleted file mode 100644 index cc6501e..0000000 --- a/Help/helps/VisualText_Interface/Tools/Tools_Hex_Viewer.htm +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - -
The Hex Viewer provides various views of the characters in a text file. -
- -The Hex Viewer can be accessed from several places within VisualText. - It can - be accessed from the main Tools Menu, - the Text Tab Popup Menu under Tools, - and from the Tools submenu in the Text - File Popup Menu.
- -The ASCII Table button displays the table of ASCII codes. You - can also see the address, hexcodes, equivalent ASCII characters, and full - 8-digit addresses for each character in the text. The slider determines - the number of characters displayed per line.
- -
Jumble is a simple non-graphic tool that converts a text file to a version - that facilitates studying the format of the file. Jumble randomly changes - the order of letters in the text file leaving punctuation and capitalization - intact.
- -The Jumble Tool can be accessed from several places within VisualText. - It can - be accessed from the Text Tab Popup - Menu under Tools, and from the Tools submenu in the Text - File Popup Menu.
- -To use the Jumble Tool:
- -Select the text - in the Text Tab.
From the right-click Menu, select Tools - > Jumble. A - .jmb (for jumble) file for the selected text is created in the same folder - as the text. (You - can also open the text file in the Workspace and select Tools > Jumble - from the right-click menu.)

Mask is a simple non-graphic tool that converts a text file to a version - that facilitates studying the format of the file. All alphabetic characters - are converted to "a" or "A", retaining capitalization - of the input text.
- -The Mask Tool can be accessed from several places within VisualText. - It can - be accessed from the Text Tab Popup - Menu under Tools, and from the Tools submenu in the Text - File Popup Menu.
- -To use the Mask Tool:
- -Select the text - in the Text Tab.
From the right-click Menu, select Tools - > Mask. A - .msk (for mask) file for the selected text is created in the same folder - as the text. (You - can also open the text file in the Workspace and select Tools > Mask - from the right-click menu.)

The Text File Info dialog displays information about a text file.
- -The Text File Info dialog can be displayed from several places within - VisualText. It - can be accessed from the main Tools Menu, - the Text Tab Popup Menu under Tools, - and from the Tools submenu in the Text - File Popup Menu.
- -The Text File Info dialog provides the location of the selected file, - creation and modification dates, line count, word count, character count, - and file size.
- -
The Find in Files dialog allows you to - find text in multiple files.
- -The Find in Files dialog is
- launched by selecting Find in Files from the Edit Menu or by selecting
- the Find in Files icon. ![]()
You can constrain the search by selecting specific file types or by - selecting another analyzer project. Search - results are displayed in the Find Window.
- -
- - -
|
- Dialog Item |
-
- Description |
|
- Find |
-
- Input panel to type text to be searched. |
|
- Match Case |
-
- Searches text matching exact case of search term. |
|
- Append |
-
- Appends search results to the Find Window. When - Append is not checked, Find Window results are cleared before results - from new search are displayed. |
|
- Pass Files |
-
- Searches for search term in pass files. |
|
- All Text Files |
-
- Searches for search term in all text files. |
|
- Concepts |
-
- Searches for search term in Gram Tab concepts. |
|
- Output Files |
-
- Searches for search term in output files. |
|
- Log Files |
-
- Searches for search term in log files. |
|
- Other Analyzer Pass Files |
-
- Shows other analyzer projects. Selecting - analyzer project enables search in pass files of specified project. |
|
- OK |
-
- Starts the search. |
|
- Cancel |
-
- Closes the Find in Finds dialog box. |
- -
- - - - diff --git a/Help/helps/VisualText_Interface/Windows/Replace_in_Files_Dialog.htm b/Help/helps/VisualText_Interface/Windows/Replace_in_Files_Dialog.htm deleted file mode 100644 index 9620f3d..0000000 --- a/Help/helps/VisualText_Interface/Windows/Replace_in_Files_Dialog.htm +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - -
The Replace in Files dialog allows you to - replace text in multiple files.
- -The Replace in Files dialog - is launched by selecting Replace in Files - from the Edit Menu. You - may specify the files where text should be replaced. Search - and replace results are displayed in the Find - Window.
- -
|
- Dialog Item |
-
- Description |
|
- Find |
-
- Input panel to type search term. |
|
- Replace With |
-
- Input panel to specify what found text should be replaced with. |
|
- Replace |
-
- Starts the search and replace function. Results - of Replace displayed in Find Window. |
|
- Cancel |
-
- Closes the Replace in Files dialog box. |
|
- Match Whole Word Only |
-
- Searches text matching whole words only. |
|
- Match Case |
-
- Searches text matching exact case of search term. |
|
- All Pass Files |
-
- Searches for search term in all pass files. |
|
- All Text Files |
-
- Searches for search term in all text files. |
|
- Replace in Pass Subfolders |
-
- Replaces instances of found search term in all pass file subfolders. |
|
- Replace in Text Subfolders |
-
- Replaces instances of found search term in all text file subfolders. |
|
- Directory |
-
- Input panel to specify directory to perform search. |
|
- File Spec |
-
- Specifies files to search by file extension. |
|
- Replace in Subfolders |
-
- Replaces instances of found search term in all subfolders. |
- - - - diff --git a/Help/helps/VisualText_Interface/Windows/ana_tab.gif b/Help/helps/VisualText_Interface/Windows/ana_tab.gif deleted file mode 100644 index 9932bcd..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/ana_tab.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/findInFilesdialog.gif b/Help/helps/VisualText_Interface/Windows/findInFilesdialog.gif deleted file mode 100644 index cb8137c..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/findInFilesdialog.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/find_in_files_wtitles.gif b/Help/helps/VisualText_Interface/Windows/find_in_files_wtitles.gif deleted file mode 100644 index ebd8453..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/find_in_files_wtitles.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/gram_tab.gif b/Help/helps/VisualText_Interface/Windows/gram_tab.gif deleted file mode 100644 index 3c9dde1..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/gram_tab.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/log_window_wtitles.gif b/Help/helps/VisualText_Interface/Windows/log_window_wtitles.gif deleted file mode 100644 index 433ab56..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/log_window_wtitles.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/parse_yellow.gif b/Help/helps/VisualText_Interface/Windows/parse_yellow.gif deleted file mode 100644 index c73ef2d..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/parse_yellow.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/replaceInFilesDialog.gif b/Help/helps/VisualText_Interface/Windows/replaceInFilesDialog.gif deleted file mode 100644 index 2b19293..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/replaceInFilesDialog.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/Windows/text_tab.gif b/Help/helps/VisualText_Interface/Windows/text_tab.gif deleted file mode 100644 index bd5ffd1..0000000 Binary files a/Help/helps/VisualText_Interface/Windows/text_tab.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/anaDependent_pref.gif b/Help/helps/VisualText_Interface/anaDependent_pref.gif deleted file mode 100644 index f6c7620..0000000 Binary files a/Help/helps/VisualText_Interface/anaDependent_pref.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/dictionaryLookup_pref.gif b/Help/helps/VisualText_Interface/dictionaryLookup_pref.gif deleted file mode 100644 index 8244375..0000000 Binary files a/Help/helps/VisualText_Interface/dictionaryLookup_pref.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/viewIcons.gif b/Help/helps/VisualText_Interface/viewIcons.gif deleted file mode 100644 index 807a317..0000000 Binary files a/Help/helps/VisualText_Interface/viewIcons.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/vt_preferences_display.gif b/Help/helps/VisualText_Interface/vt_preferences_display.gif deleted file mode 100644 index 04e3b19..0000000 Binary files a/Help/helps/VisualText_Interface/vt_preferences_display.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/vt_preferences_gen.gif b/Help/helps/VisualText_Interface/vt_preferences_gen.gif deleted file mode 100644 index 061f170..0000000 Binary files a/Help/helps/VisualText_Interface/vt_preferences_gen.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/vt_prefereneces_email.gif b/Help/helps/VisualText_Interface/vt_prefereneces_email.gif deleted file mode 100644 index 43deeec..0000000 Binary files a/Help/helps/VisualText_Interface/vt_prefereneces_email.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/vt_preferneces_archiving.gif b/Help/helps/VisualText_Interface/vt_preferneces_archiving.gif deleted file mode 100644 index 3cbe8c5..0000000 Binary files a/Help/helps/VisualText_Interface/vt_preferneces_archiving.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/windowToggles.gif b/Help/helps/VisualText_Interface/windowToggles.gif deleted file mode 100644 index 7948e8b..0000000 Binary files a/Help/helps/VisualText_Interface/windowToggles.gif and /dev/null differ diff --git a/Help/helps/VisualText_Interface/window_pulldown.gif b/Help/helps/VisualText_Interface/window_pulldown.gif deleted file mode 100644 index 58ee293..0000000 Binary files a/Help/helps/VisualText_Interface/window_pulldown.gif and /dev/null differ diff --git a/Help/helps/Working_with_Unicode.htm b/Help/helps/Working_with_Unicode.htm deleted file mode 100644 index 947d4fb..0000000 --- a/Help/helps/Working_with_Unicode.htm +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - -
Starting with VisualText 2.0.1, a Unicode VisualText executable is available - with every release.
- -Unicode is well-documented on the web. Basically, - Unicode is a character set that supports the major languages and character - sets. To - do this, characters consist of two bytes, rather than the ANSI or ASCII - representation of characters with one byte.
- -While the advantages of Unicode are tremendous, it also adds substantial - complexity and headaches to programs that use it. Also, - Unicode is necessarily processed more slowly than single-byte character - representations.
- -VisualText support for Unicode is an ongoing enterprise. The - 2.0.1 release provides default tokenization for the world's character - sets (or "scripts"), as well as supporting Unicode characters - in NLP++ strings, in the GUI, in knowledge bases, compiled analyzers, - and the like.
- -In subsequent releases, we plan to add NLP++ functions that will help - characterize and manipulate Unicode constructs in text, parse trees, strings, - and the knowledge base.
- -To display and input Unicode fonts, you'll need to consult your Microsoft - Windows documentation. For - example, in Windows XP, select
- -Start Button > Settings > Control Panel > Regional and Language - Settings
- -The Languages tab there lets you install fonts for complex and East - Asian character sets. The - Details button within the Languages tab lets you set up input in various - character sets, and so on.
- -[1] If using English only or small Western alphabets (e.g., French, - Spanish, German), consider staying with ANSI VisualText.
- -[2] An analyzer should be used with Unicode or ANSI VisualText, but - not both.
- -[3] Unicode VisualText writes files out using the UTF-8 format and expects - to read files in the same format. If - an input file contains Unicode characters, then VisualText expects it - to have the Byte Order Marker (BOM) as required of Windows files. A - nice thing about UTF-8 is that normal ANSI or ASCII files are automatically - in the right format, with or without a BOM header.
- -
If a file does not appear to be read correctly by VisualText,
- then it may have come from a non-Windows source. Try
- opening the file in an application such as WordPad, add a character, then
- remove the character, then save the file as UTF-8. This
- should automatically add the BOM head to the beginning of the file.
[4] KB dictionary indexing. We'll - be providing analyzer templates specific for Unicode. You - can also manually add dictionary indexes to the knowledge base (by editing - the kb\user\hier.kb file). Contact - us at support@textanalysis.com for help with these issues.
- -add hier "concept" "sys" "dict" "a"
- "z" "zy"
-add hier "concept" "sys" "dict" "a"
- "あ"
-add hier "concept" "sys" "dict" "a"
- "あ" "あ"
Basically, you'll want to add lines like the second and third above, - in order to have Unicode characters distributed well within the KB dictionary.
- -[5] No particular updates have been made yet to RUG (Automated Rule - Generation) for Unicode VisualText.
- -- - - - diff --git a/Help/helps/X.htm b/Help/helps/X.htm deleted file mode 100644 index 406745b..0000000 --- a/Help/helps/X.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - -
Reference to a parse tree node or its variable. See - Variables.
- - - - diff --git a/Help/helps/_xALPHA.htm b/Help/helps/_xALPHA.htm deleted file mode 100644 index 16f8f29..0000000 --- a/Help/helps/_xALPHA.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - -Match an alphabetic token, including accented and other extended ANSI - chars.
- -_xCAP, _xNUM, _xCTRL, - Special Rule Elements
- - - - diff --git a/Help/helps/_xANY.htm b/Help/helps/_xANY.htm deleted file mode 100644 index cb34b65..0000000 --- a/Help/helps/_xANY.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - -Match any single node.
- -A rule written with _xANY [max=0] will not work. _xANY - is not implemented as a wildcard. Instead, - the near equivalent _xANY _xWILD should be used.
- -min, - max, Special Rule Elements, - Phrase Element - Modifiers
- - - - diff --git a/Help/helps/_xBLANK.htm b/Help/helps/_xBLANK.htm deleted file mode 100644 index b7dd4c5..0000000 --- a/Help/helps/_xBLANK.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - -Match a whitespace token, excluding newline.
- -_xBLANK is equivalent to _xWILD [match=(\ \t)].
- -_xWHITE, Special - Rule Elements
- - - - diff --git a/Help/helps/_xCAP.htm b/Help/helps/_xCAP.htm deleted file mode 100644 index 399ddb0..0000000 --- a/Help/helps/_xCAP.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match an alphabetic with uppercase first letter.
- -_xALPHA, Special - Rule Elements
- - - - diff --git a/Help/helps/_xCAPLET.htm b/Help/helps/_xCAPLET.htm deleted file mode 100644 index c388daf..0000000 --- a/Help/helps/_xCAPLET.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match an alphabetic consisting of a single uppercase letter.
- -_xLET, Special - Rule Elements
- - - - diff --git a/Help/helps/_xCTRL.htm b/Help/helps/_xCTRL.htm deleted file mode 100644 index 782dbb9..0000000 --- a/Help/helps/_xCTRL.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match control and nonalphabetic extended ANSI characters.
- -_xALPHA, Special - Rule Elements
- - - - diff --git a/Help/helps/_xEND.htm b/Help/helps/_xEND.htm deleted file mode 100644 index 4f7cf2a..0000000 --- a/Help/helps/_xEND.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match if at the end of a phrase (or "segment").
- -_xSTART, Special - Rule Elements
- - - - diff --git a/Help/helps/_xEOF.htm b/Help/helps/_xEOF.htm deleted file mode 100644 index 243d6bf..0000000 --- a/Help/helps/_xEOF.htm +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - -Match the end of file.
- -Match an alphabetic consisting of a single letter.
- -_xCAPLET, Special - Rule Elements
- - - - diff --git a/Help/helps/_xNIL.htm b/Help/helps/_xNIL.htm deleted file mode 100644 index 2a8d77b..0000000 --- a/Help/helps/_xNIL.htm +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - -Match nothing. Designates - a suggested element when the rule performs a special action, such as removing - the matched nodes from the parse tree.
- -_xNIL has no special action, but serves as documentation for the rule - writer.
- -_xWILD, Special - Rule Elements
- - - - diff --git a/Help/helps/_xNUM.htm b/Help/helps/_xNUM.htm deleted file mode 100644 index cf74a41..0000000 --- a/Help/helps/_xNUM.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match a numeric token.
- -_xALPHA, Special - Rule Elements
- - - - diff --git a/Help/helps/_xPUNCT.htm b/Help/helps/_xPUNCT.htm deleted file mode 100644 index 257fb59..0000000 --- a/Help/helps/_xPUNCT.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match a punctuation token.
- -_ALPHA, Special - Rule Elements
- - - - diff --git a/Help/helps/_xSTART.htm b/Help/helps/_xSTART.htm deleted file mode 100644 index c2f318d..0000000 --- a/Help/helps/_xSTART.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match if at the start of a phrase (or "segment").
- -_xEND, Special - Rule Elements
- - - - diff --git a/Help/helps/_xWHITE.htm b/Help/helps/_xWHITE.htm deleted file mode 100644 index 94a2792..0000000 --- a/Help/helps/_xWHITE.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - -Match a whitespace token, including newline.
- -_xBLANK, Special - Rule Elements
- - - - diff --git a/Help/helps/_xWILD.htm b/Help/helps/_xWILD.htm deleted file mode 100644 index 85565f8..0000000 --- a/Help/helps/_xWILD.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - -Match anything. _xWILD - is an unrestricted wildcard. Key-value pairs may add restrictions on number - of nodes matched and on what is matched.
- -With a match or fail list, _xWILD becomes an "OR" matching - function.
- -min, - max, matches, - Phrase Element - Modifiers, Special - Rule Elements
- - - - diff --git a/Help/helps/addattr.htm b/Help/helps/addattr.htm deleted file mode 100644 index d0bb9a1..0000000 --- a/Help/helps/addattr.htm +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - -Add an empty attribute named nameString - (one with no value) to the concept named concept.
- -returnedAttribute = addattr(concept, nameString);
- -returnedAttribute - type: attr
-concept - type: con
-nameString - type: str
A handle on the newly created attribute.
- -You may know an attribute before you know its value. With this function, - you can create the attribute without mentioning a value. If a bad concept - is passed, a warning is written to output log file - "Warning: Given - no concept." Attribute names are unique, so if you try to add the - same name more than once, i.e. if called repeatedly with the same arguments, - the repeated call is ignored and only one attribute is added.
- -@CODE
-G("myConcept") = makeconcept(findroot(),"a concept");
-G("myAttr") = addattr(G("myConcept"),"an attribute");
-"output.txt" << attrname(G("myAttr")) << "\n";
This prints out the following to output.txt:
- -an attribute
- -addconval, addnumval, - addstrval, addsval, - Knowledge Base Functions
- -- - - - diff --git a/Help/helps/addcnode.htm b/Help/helps/addcnode.htm deleted file mode 100644 index 5faa64a..0000000 --- a/Help/helps/addcnode.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - -
Add the named node nodeName - to the end of the concept aConcept's - phrase.
- -returnedConcept = addcnode(aConcept, nodeName)
- -returnedConcpet - type: con
-aConcept - type: con
-nodeName - type:
addnode, makephrase, - Knowledge Base Functions
- - - - diff --git a/Help/helps/addconval.htm b/Help/helps/addconval.htm deleted file mode 100644 index e85607e..0000000 --- a/Help/helps/addconval.htm +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - -Add the concept value valueConcept - to the attribute attrNameString - belonging to the concept concept.
- -addconval(concept, attrNameString, valueConcept)
- -concept - type: con
-attrNameString - type: str
-valueConcept - type: con
Nothing
- -Concepts can have zero or more attributes, and attributes can have zero - or more values. Values of attributes can be strings, numbers or other - concepts. This function adds a concept to the value of other another concept's - attribute. All concepts need to be rooted in the concept hierarchy, so - first you need to create them before you can assign them as values of - attributes to other concepts.
- -If the attribute doesn't exist yet, addconval will create it. If the - concept or the value concept is bad, an error appears in the log output - window.
- -In this example, we show how we can create a concept like noun and assign - it as the value of a word's attribute. We create the concepts named words and noun - as children to the root of the KB (concept), - and then make the concept book - a child of words.
- -G("words") = makeconcept(findroot(), "words");
-G("noun") = makeconcept(findroot(),"noun");
-G("noun_book") = makeconcept(G("words"),"book");
The KB editor at this point looks like:
- -
Next, give book - the attribute "is a" - and make the concept noun be the - value of book's attribute "is a":
- -G("an_attr") = addattr(G("noun_book"),"is a");
-addconval(G("noun_book"), "is a", G("noun"));
The remaining code finds the first child of words - named book, - gets the concept which is the value of the attribute "is - a" and prints out its name - ('noun') to output.txt:
- -G("aConcept") = getconcept(G("words"),"book");
-G("anotherConcept") = getconval(findvals(G("aConcept"),"is a"));
-"output.txt" << conceptname(G("anotherConcept")) << "\n";
addsval, addstrval, - addnumval, Knowledge - Base Functions
- - - - diff --git a/Help/helps/addnode.htm b/Help/helps/addnode.htm deleted file mode 100644 index b0c274a..0000000 --- a/Help/helps/addnode.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -Add named node nodeName as - the numth node number in a phrase - aPhrase.
- -returnedNode = addnode(aPhrase, nodeName, number);
- -returnedNode - type: con
-aPhrase - type: phr
-nodeName - type: str
-number - type: int
addcnode, makephrase, - Knowledge Base Functions
- - - - diff --git a/Help/helps/addnumval.htm b/Help/helps/addnumval.htm deleted file mode 100644 index 91daffc..0000000 --- a/Help/helps/addnumval.htm +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - -Add the number valueNumber - as a numeric value to the concept concept's - attribute that has name attrNameString.
- -addnumval(concept, attrNameString, valueNumber)
- -concept - type: con
-attrNameString - type: str
-valueNumber - type: int
Nothing
- -If the attribute doesn't exist yet, addnumval - will create it. If the concept is bad, an error appears in the log output - window at runtime.
- -@CODE
-G("Malibu") = makeconcept(findroot(), "Malibu");
-addstrval(G("Malibu"),"Latitude Direction","North");
-addstrval(G("Malibu"),"Longitude Direction","West");
-addnumval(G("Malibu"),"Latitude value",33);
-addnumval(G("Malibu"),"Longitude value",118);
-addsval(G("Malibu"),"Route",1+2);
addattr, addsval, - addstrval, Knowledge - Base Functions
- - - - diff --git a/Help/helps/addstrval.htm b/Help/helps/addstrval.htm deleted file mode 100644 index 1134344..0000000 --- a/Help/helps/addstrval.htm +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - -Add the string valueString - as a string value to the concept concept's - attribute that has name nameString.
- -addstrval(concept, nameString, valueString)
- -concept - type: con
-nameString - type: str
-valueString - type: str
Nothing
- -If the attribute doesn't exist yet, addstrval - will create it. If the concept is bad, an error appears in the log output - window at runtime.
- -G("Malibu") = makeconcept(findroot(), "Malibu");
-addstrval(G("Malibu"),"Latitude Direction","North");
-addstrval(G("Malibu"),"Longitude Direction","West");
-addnumval(G("Malibu"),"Latitude value",33);
-addnumval(G("Malibu"),"Longitude value",118);
-addsval(G("Malibu"),"Route",1+2);
addconval, addsval, addnumval, Knowledge Base Functions
- -- - - - diff --git a/Help/helps/addsval.htm b/Help/helps/addsval.htm deleted file mode 100644 index b74d35e..0000000 --- a/Help/helps/addsval.htm +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - -
Add numeric value number as - a string to concept concept's - attribute named nameString.
- -addsval(concept, nameString, number)
- -concept - type: con
-nameString - type: str
-number - type: int
Nothing.
- -If the attribute has not been created yet, addsval - will create it.
- -Sometimes it is convenient to treat a number like a string. In this - case, you can perform numeric operations in the number field of this function, - but then have the result stored in the KB as a string.
- -@CODE
- -G("Malibu") = makeconcept(findroot(), "Malibu");
-addsval(G("Malibu"),"Route",1+2);
addstrval, addnumval, addconval, Knowledge Base Functions
- -- - - - diff --git a/Help/helps/addword.htm b/Help/helps/addword.htm deleted file mode 100644 index c0ae25c..0000000 --- a/Help/helps/addword.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - -
Add dictionary concept wordString - to the KB dictionary hierarchy. Return - a handle to concept.
- -returnedWordConcept = addword(wordString)
- -returnedWordConcept - type: con
-wordString - type: str
Handle to the newly created word concept. If the word cannot be added, - returns 0.
- -The dictionary is a specialized part of the KB hierarchy used to store - and lookup words.
- -@CODE
-"output.txt" << "1 " << conceptname(addword("hello")) << "\n";
-"output.txt" << "2 " << conceptname(wordindex("hello")) << "\n";
-"output.txt" << "3 " << findwordpath("hello") << "\n";
-"output.txt" << "4 " << findwordpath("olleh") << "\n";
-"output.txt" << "5 " << wordpath("foobaz") << "\n";
-"output.txt" << "6 " << conceptname(dictfindword("hello")) << \n";
-rmword("foobaz");
Prints out:
- -1 hello
-2 he
-3 "concept" "sys" "dict" "a" "h" "he" "hello"
-4
-5 "concept" "sys" "dict" "a" "f" "fo" "foobaz"
-6 hello
dictgetword, wordindex, - wordpath, rmword, - Knowledge Base Functions
- -- - - - diff --git a/Help/helps/arraylength.htm b/Help/helps/arraylength.htm deleted file mode 100644 index 6eac675..0000000 --- a/Help/helps/arraylength.htm +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - -
Count the number of values in a given variable.
- -returnedNumber = arraylength(variableName)
- -returnedNumber - type: int
-variableName - type: var
Note that the variableName must evaluate to a variable reference (G, - S, X, N).
- -WARNING: arraylength() - never returns 0, since every variable is considered to have at least one - value. This - may yield unexpected behaviors at times.
- -Layer additional attributes for the element in the parse tree, as "mini-reductions". -
- -Use the names in the list to name nodes. Each node that matched current - rule element will be layered. layer, layers, - and attrs are alternate forms - for attr.
- -attr can also be used as a suggested - element modifier.
- -Suggested - Element Modifiers, Phrase - Element Modifiers
- -- - - - diff --git a/Help/helps/attrchange.htm b/Help/helps/attrchange.htm deleted file mode 100644 index ee8f264..0000000 --- a/Help/helps/attrchange.htm +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - -
Replace all matching attribute-value pairs attrStr-oldValStr in the KB belonging to the - concept aConcept to new attribute-value - pairs attrStr-newValStr.
- -returnedBoolean = attrchange(aConcept, attrStr, oldValStr, newValStr)
- -returnedBoolean - type: bool
-aConcept - type: con
-attrStr - type: str
-oldValStr - type: str
-newValStr - type: str
1 if at least one pair is changed, 0 otherwise.
- -Think of this as a global replace. If passed a bad concept, the function - writes an error to the output log.
- -# if you find apples in the concept hierarchy
-if (findconcept(findroot(),"apple"))
-# kill them (to start fresh)
-rmconcept(findconcept(findroot(),"apple"));
-# Create the apple concept
-G("apple") = makeconcept(findroot(),"apple");
-# Apple's color's red
-addstrval(G("apple"),"color","red");
-# MacIntosh apples are also red
-addstrval(makeconcept(G("apple"),"MacIntosh"),"color","red");
-# Print out apple's attribute and value
-if(attrname(findattrs(G("apple")))){
-"output.txt" << "1) apples " << attrname(findattrs(G("apple")));
-"output.txt" << " "
-<< getstrval(attrvals(findattrs(G("apple")))) << "\n";
-}
-# Test for a given attribute and value
-"output.txt" << "2) are apples red? "
-<< attrwithval(G("apple"), "color", "red") << "\n";
-"output.txt" << "3) are apples blue? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
-# Change a value of a given attribute to another value.
-attrchange(findroot(), "color", "red", "blue");
-"output.txt" << "4) are apples blue now? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
The code above writes the following to output.txt:
- -1) apples color red
-2) are apples red? 1
-3) are apples blue? 0
-4) are apples blue now? 1
Since attrchange operates on all children of the parent concept, the - resulting KB looks like:
- -
replaceval, Knowledge Base Functions -
- - - - diff --git a/Help/helps/attrexists.htm b/Help/helps/attrexists.htm deleted file mode 100644 index ccce57f..0000000 --- a/Help/helps/attrexists.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - -Find attribute attrStr with - value valStr, searching in the - subhierarchy of concept parentConcept. -
- -returnedBoolean = attrexists(parentConcept, attrStr, valStr)
- -returnedBoolean - type: bool
-parentConcept - type: con
-attrStr - type: str
-valStr - type: str
1 if any concept below parentConcept - has the attribute-value pair, 0 otherwise. Passed a bad concept, the function - writes an error to the output log.
- -The search starts at the named concept, and continues down its entire - subhierarchy. Contrast this with attrwithval, - which is limited to only the argument concept.
- -# if you find apples in the concept hierarchy
-if (findconcept(findroot(),"apple"))
-# kill them (to start fresh)
-rmconcept(findconcept(findroot(),"apple"));
-# Create the apple concept
-G("apple") = makeconcept(findroot(),"apple");
-# Apple's color's red
-addstrval(G("apple"),"color","red");
-# MacIntosh apples are also red
-addstrval(makeconcept(G("apple"),"MacIntosh"),"color","red");
-# Print out apple's attribute and value
-if(attrname(findattrs(G("apple")))){
-"output.txt" << "1) apples " << attrname(findattrs(G("apple")));
-"output.txt" << " "
-<< getstrval(attrvals(findattrs(G("apple")))) << "\n";
-}
-# Test for a given attribute and value
-"output.txt" << "2) are apples red? " <<
-attrwithval(G("apple"), "color", "red") << "\n";
-"output.txt" << "3) are apples blue? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
-# Change a value of a given attribute to another value.
-attrchange(findroot(), "color", "red", "blue");
-"output.txt" << "4) are apples blue now? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
-"output.txt" << "5) " << attrexists(findroot(), "color", "blue");
The code above writes the following to output.txt:
- -1) apples color red
-2) are apples red? 1
-3) are apples blue? 0
-4) are apples blue now? 1
-5) 1
attrwithval, - Knowledge Base Functions
- - - - diff --git a/Help/helps/attrname.htm b/Help/helps/attrname.htm deleted file mode 100644 index 80e60a1..0000000 --- a/Help/helps/attrname.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - -Fetch the name of an knowledge base attribute.
- -returnedString = attrname(anAttribute);
- -returnedString - type: str
-anAttribute - type: con
A string which is the name of the passed attribute.
- -If you try to print out an attribute directly, you'll get an error. - This function returns the string value name of an attribute. If a bad - attribute is passed, an error is written to output log file.
- -G("myConcept") = makeconcept(findroot(),"a concept");
-G("myAttr") = addattr(G("myConcept"),"an attribute");
-"output.txt" << attrname(G("myAttr")) << "\n";
This prints out
- -an attribute
- -conceptname, - Knowledge Base Functions
- - - - diff --git a/Help/helps/attrs.htm b/Help/helps/attrs.htm deleted file mode 100644 index 91e8cdc..0000000 --- a/Help/helps/attrs.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - -Layer additional attributes for the element in the parse tree, as "mini-reductions". -
- -Use the names in the list to name nodes. Each node that matched current - rule element will be layered. layer, layers, - and attr are alternate forms for - attrs.
- -attrs can also be used as a - suggested element modifier.
- -Suggested - Element Modifiers, Phrase - Element Modifiers
- -- - - - diff --git a/Help/helps/attrtype.htm b/Help/helps/attrtype.htm deleted file mode 100644 index 5ab108b..0000000 --- a/Help/helps/attrtype.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - -
Fetch an attribute's type
- -type = attrtype(concept,attr_name);
- -returnedValue(s) - type: number
-anAttribute - type: attr
Returns 0 for string, 1 for number, 2 for concept, and 3 for float.
- -This allows for calling the correct function, either getstrval, getnumval, or getconval.
- -Fetch attribute's list of values.
- -returnedValue(s) = attrvals(anAttribute);
- -returnedValue(s) - type: val
-anAttribute - type: attr
A list of values.
- -Concepts can have zero or more attributes. Each attribute can zero or - more values. This function takes an attribute as argument and returns - the list of values associated with the attribute. If there are no values - of the attribute, the function returns NULL.
- -To demonstrate attrvals, we first need to build a KB:
- -@CODE
-# if you find apples in the concept hierarchy
-if (findconcept(findroot(),"apple"))
-# kill them (to start fresh)
-rmconcept(findconcept(findroot(),"apple"));
-# Create the apple concept
-G("apple") = makeconcept(findroot(),"apple");
-# Apples have color
-addstrval(G("apple"),"have","color");
-# Apple's color is red
-addstrval(G("apple"),"color","red");
-# Apple's color is also green and yellow
-addstrval(G("apple"),"color","green and yellow");
The code creates a KB like this:
- -
The following code accesses the KB's attributes and values:
- -# Find apple's attribute list
-G("attrList") = findattrs(G("apple"));
-# Find the list of values of the first attribute
-G("valList") = attrvals(G("attrList"));
-# print out the first attribute's name and value
-if(attrname(G("attrList"))){
-"output.txt" << "1) first attribute of apple is: "
-<< attrname(G("attrList")) << "\n";
-"output.txt" << "2) first value of that attribute is: "
-<< getstrval(G("valList")) << "\n";}
-# get the next attribute
-G("nextAttr") = nextattr(G("attrList"));
-if(attrname(nextattr(G("attrList"))))
-"output.txt" << "3) next attribute of apple is: "
-<< attrname(G("nextAttr")) << "\n";
-# get the list of values of the second attribute
-G("valList") = attrvals(G("nextAttr"));
-# print the first value's name
-"output.txt" << "4) first value of that attribute is: "
-<< getstrval(G("valList")) << "\n";
-# print the second value of the second attribute
-"output.txt" << "5) second value of that attribute is: "
-<< getstrval(nextval(G("valList"))) << "\n";
The output looks like this:
- -
attrexists, attrwithval, findvals, - Knowledge Base Functions
- - - - diff --git a/Help/helps/attrwithval.htm b/Help/helps/attrwithval.htm deleted file mode 100644 index 84d8088..0000000 --- a/Help/helps/attrwithval.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - -Check concept to see if it - has attribute attrStr with value - valStr.
- -returnedBoolean = attrwithval(concept, attrStr, valStr)
- -returnedBoolean - type: bool (1 or 0)
-concept - type: con
-attrStr - type: str
-valStr - type: str
1 if the concept has the attribute-value pair, 0 otherwise. Passed a - bad concept, the function writes an error to the output log.
- -If an attribute has multiple values, returns true if one of the values - matches valStr. Limited - to string-valued attributes.
- -# if you find apples in the concept hierarchy
-if (findconcept(findroot(),"apple"))
-# kill them (to start fresh)
-rmconcept(findconcept(findroot(),"apple"));
-# Create the apple concept
-G("apple") = makeconcept(findroot(),"apple");
-# Apple's color's red
-addstrval(G("apple"),"color","red");
-# MacIntosh apples are also red
-addstrval(makeconcept(G("apple"),"MacIntosh"),"color","red");
-# Print out apple's attribute and value
-if(attrname(findattrs(G("apple")))){
-"output.txt" << "1) apples " << attrname(findattrs(G("apple")));
-"output.txt" << " "
-<< getstrval(attrvals(findattrs(G("apple")))) << "\n";
-}
-# Test for a given attribute and value
-"output.txt" << "2) are apples red? " <<
-attrwithval(G("apple"), "color", "red") << "\n";
-"output.txt" << "3) are apples blue? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
-# Change a value of a given attribute to another value.
-attrchange(findroot(), "color", "red", "blue");
-"output.txt" << "4) are apples blue now? " <<
-attrwithval(G("apple"), "color", "blue") << "\n";
The code above writes the following to output.txt:
- -1) apples color red
-2) are apples red? 1
-3) are apples blue? 0
-4) are apples blue now? 1
attrexists, attrvals, - Knowledge - Base Functions
- -- - - - diff --git a/Help/helps/base.htm b/Help/helps/base.htm deleted file mode 100644 index f2a978b..0000000 --- a/Help/helps/base.htm +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - -
The base suggested-element modifier specifies that the reduce node will - be the bottom-most node in a singlet - chain. That - is, subsequent rules using the singlet element modifier will not look - "down" past a node labeled with the base attribute.
- -Base and singlet provide a mechanism for layering multiple attributes - and syntactic and semantic ambiguities directly into the parse tree.
- -The example will help clarify the use of the base modifier.
- -# The rule below reduces a node labeled _noun to an _np. It
- places an internal flag called "base" on the _np node.
-# Subsequent rules (e.g., in subsequent passes) that are searching for
- _noun will not find it under an _np created with the current rule.
-@RULES
-_np [base] <- _noun @@
# Say a subsequent pass has this rule. Even
- though the s (or singlet) modifier says to look "within" a node
- for _noun, it won't find it within an _np
-# labeled with a base flag, as created by the rule above.
-@RULES
-_np <- _adj _noun [s] @@
- -
Suggested - Element Modifiers.
- - - - diff --git a/Help/helps/batchstart.htm b/Help/helps/batchstart.htm deleted file mode 100644 index 8075ef2..0000000 --- a/Help/helps/batchstart.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - -Check if a batch analysis process has just begun.
- -returnedBool = batchstart()
- -returnedBool - type: bool
- -True if we're processing the first file in a batch, as signaled by the - Batch Toggle in the VisualText GUI.
- -@CODE
-G("startflag") = batchstart();
-@@CODE
- - - - diff --git a/Help/helps/cap.htm b/Help/helps/cap.htm deleted file mode 100644 index 543b517..0000000 --- a/Help/helps/cap.htm +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - -
Pre action that succeeds if leaf token has capitalized first letter.
- -<fromRuleEltNumber,toRuleEltNumber>cap();
- -fromRuleEltNumber - type: int
-toRuleEltNumber - type: int
@PRE
-<1,1>cap();
-@RULES
-_noun <- _xALPHA@@
uppercase, lowercase, - PRE Actions -
- -- -
- - - - diff --git a/Help/helps/cbuf.htm b/Help/helps/cbuf.htm deleted file mode 100644 index 0fb8845..0000000 --- a/Help/helps/cbuf.htm +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - -
Send output to user-supplied buffer.
- -returnedOstream = cbuf()
- -returnedOstream - type: ostream
- -For use in embedded or standalone analyzers. User - may supply an output buffer to an API call such as nlp->analyze(). - Then sending - output to cbuf() will write to the user-supplied output stream.
- -@CODE
- -# In VisualText, output to a file. Outside VisualText, output to user-supplied buffer.
- -if (interactive())
- -G("out") = "buf.txt";
- -else
- -G("out") = cbuf();
- -G("out") << "Hello output buffer!" << "\n";
- -@@CODE
- -Close the output file stream.
- -returnedBool = closefile(fileOstream)
- -returnedBool - type: bool
-fileOstream - type: ostream
@CODE
-G("file") = openfile("c:\\tmp.txt");
-closefile(G("file"));
-@@CODE
openfile, Formatting - and I/O Functions
- -- - - - diff --git a/Help/helps/conceptname.htm b/Help/helps/conceptname.htm deleted file mode 100644 index 821fa2c..0000000 --- a/Help/helps/conceptname.htm +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - -
Fetch the string value name of a concept.
- -returnedString = conceptname(concept)
- -returnedString - type: str
-concept - type: con
Name of concept as a string.
- -You cannot directly print out the name of a concept by referring to - its handle, but instead must use this function to access its string valued - name. If the concept is bad, an error appears in the log output window.
- -@CODE
- -"output.txt" << conceptname(makeconcept(findroot(),"test"));
- -Prints out the following in output.txt
- -test
- -attrname, Knowledge - Base Functions
- - - - diff --git a/Help/helps/conceptpath.htm b/Help/helps/conceptpath.htm deleted file mode 100644 index 2d36453..0000000 --- a/Help/helps/conceptpath.htm +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - -Fetch entire path of given concept as a string.
- -returnedString = conceptpath(concept)
- -returnedString - type: str
-concept - type: con
Path of concept as a string.
- -If the concept is bad, an error appears in the output log window.
- -G("childConcept") = makeconcept(makeconcept(findroot(), "parent"), "child");
-"output.txt" << conceptpath(G("childConcept"));
Writes the following to output.txt:
- -"concept" "parent" "child"
- -attrname, findwordpath, - wordpath, Knowledge - Base Functions
- - - - diff --git a/Help/helps/conval.htm b/Help/helps/conval.htm deleted file mode 100644 index 8882601..0000000 --- a/Help/helps/conval.htm +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - -Fetch concept-value of attribute attrNameString - (must be first) belonging to concept concept.
- -returnedConcept = conval(concept, attrNameString)
- -returnedConcept - type: con
-concept - type: con
-attrNameString - type: str
returnedConcept - type: con
- -An attribute's value can be a concept, and conval returns attribute - values of this type. If - an attribute has multiple values, it only fetches the first. If - it can't fetch a concept value, it returns 0.
- -First, create the concepts named words - and noun as children to the - root of the KB, then make the concept book - a child of words.
- -G("words") = makeconcept(findroot(), "words");
-G("noun") = makeconcept(findroot(),"noun");
-G("noun_book") = makeconcept(G("words"),"book");
The KB editor at this point looks like:
- -
Next, give book - the attribute "is a" - and make the concept noun be - the value of book's attribute - "is a":
- -G("an_attr") = addattr(G("noun_book"),"is a");
-addconval(G("noun_book"), "is a", G("noun"));
The remaining code fetches the value of the "is a" attribute, - i.e., the noun concept, and prints its name:
- -G("bConcept") = conval(G("noun_book"),"is a");
- -"output.txt" << conceptname(G("bConcept")) << "\n";
- -This prints the following to output.txt:
- -noun
- -numval, strval, - getconval, Knowledge - Base Functions
- - - - diff --git a/Help/helps/cout.htm b/Help/helps/cout.htm deleted file mode 100644 index 50a23b2..0000000 --- a/Help/helps/cout.htm +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - -Send output to standard output or user-supplied stream.
- -returnedOstream = cout()
- -returnedOstream - type: ostream
- -For use in embedded or standalone analyzers. User - may supply an output stream to an API call such as nlp->analyze(). - Then sending - output to cout() will write to the user-supplied output stream.
- -@CODE
- -# In VisualText, output to a file. Outside VisualText, output to user-supplied stream.
- -if (interactive())
- -G("out") = "out.txt";
- -else
- -G("out") = cout();
- -G("out") << "Hello output stream!" << "\n";
- -@@CODE
- -Rebind the output stream cout to a given file.
- -returnedOstream = coutreset(fileNameStr)
- -returnedOstream - type: ostream
- -fileNameStr - type: string
- -In VisualText, a way to bind where outputs to cout() are sent.
- -@CODE
- -# In VisualText, output to a file. Outside VisualText, output to user-supplied stream.
- -if (interactive())
- -coutreset("out.txt");
- -cout() << "Hello output stream!" << "\n";
- -@@CODE
- -Allocate statement handle for the currently open database.
- -returnedBool = dballocstmt()
- -returnedBool - type: bool
True if successful.
- -NLP++ database functions assume only one statement handle is open at - a time. In - addition, one can call dbexec() - to execute a statement in a separate fashion.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("INSERT INTO employee (name, age) VALUES('John Smith','32');");
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- - - - diff --git a/Help/helps/dbbindcol.htm b/Help/helps/dbbindcol.htm deleted file mode 100644 index 5beb991..0000000 --- a/Help/helps/dbbindcol.htm +++ /dev/null @@ -1,1494 +0,0 @@ - - - - - - - - - - -
Bind a database table's column to an NLP++ variable.
- -return_bool = dbbindcol(column_num, type_str, size_num, &var, &flag_var)
- -return_bool - True if successful, else false
- -column_num - Database column number
- -type_str - Database type for the given column. See table below
- -size_num - For some database types, indicates the required storage size for retrieving the data
- -&var - (call by reference). NLP++ variable to receive the fetched column value.
- -&flag_var - (call by reference). NLP++ variable to indicate whether the column had a value.
-
True if successful.
- -The associated function dbfetch - fetches a database table row, filling all the bound variables.
- -The supported database types (those not in parentheses) and their conversion - to NLP++ types are listed here:
- - -|
- DATABASE TYPE |
-
- NLP++ TYPE |
-
- SPECIFY SIZE? |
|
- BIGINT |
-
- NUM |
-
- no |
|
- BINARY |
-
- STR |
-
- yes |
|
- BIT |
-
- NUM |
-
- no |
|
- (BLOB) |
-
- --- |
-
- --- |
|
- CHAR |
-
- STR |
-
- yes |
|
- DATE |
-
- STR |
-
- no |
|
- DATETIME |
-
- STR |
-
- no |
|
- DECIMAL |
-
- FLOAT |
-
- no |
|
- DOUBLE |
-
- FLOAT |
-
- no |
|
- ENUM |
-
- STR |
-
- yes |
|
- FLOAT |
-
- FLOAT |
-
- no |
|
- INT |
-
- NUM |
-
- no |
|
- INTEGER |
-
- NUM |
-
- no |
|
- (LONGBLOB) |
-
- --- |
-
- --- |
|
- LONGVARBINARY |
-
- STR |
-
- yes |
|
- (MEDIUMBLOB) |
-
- --- |
-
- --- |
|
- MEDIUMINT |
-
- NUM |
-
- no |
|
- NUMERIC |
-
- FLOAT |
-
- no |
|
- REAL |
-
- FLOAT |
-
- no |
|
- SET |
-
- STR |
-
- yes |
|
- SMALLINT |
-
- NUM |
-
- no |
|
- TIME |
-
- STR |
-
- no |
|
- TIMESTAMP |
-
- STR |
-
- no |
|
- TINYBLOB |
-
- STR |
-
- yes |
|
- TINYINT |
-
- NUM |
-
- no |
|
- VARBINARY |
-
- STR |
-
- yes |
|
- VARCHAR |
-
- STR |
-
- yes |
|
- YEAR |
-
- STR |
-
- no |
|
-
|
-
-
|
-
-
|
@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("SELECT * FROM employee;");
- -dbbindcol(1,"varchar",50,&G("employee name"),&G("result1"));
- -while (dbfetch())
- -{
- -"output.txt" << "employee name: ";
- -if (G("result1"))
- -"output.txt" << G("employee name") << "\n";
- -else
- -"output.txt" << "NULL" << "\n";
- -}
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/dbclose.htm b/Help/helps/dbclose.htm deleted file mode 100644 index 9f510e5..0000000 --- a/Help/helps/dbclose.htm +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - -
Close the currently open database.
- -return_bool = dbclose()
- -return_bool - True if successful, else false
-
True if successful.
- -Close the currently open database. NLP++ - currently allows only one database to be open at a time.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("SELECT * FROM table;");
- -dbbindcol(1,"varchar",50,&G("employee name"),&G("result1"));
- -while (dbfetch())
- -{
- -"output.txt" << "employee name: ";
- -if (G("result1"))
- -"output.txt" << G("employee name") << "\n";
- -else
- -"output.txt" << "NULL" << "\n";
- -}
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/dbexec.htm b/Help/helps/dbexec.htm deleted file mode 100644 index 1d4661f..0000000 --- a/Help/helps/dbexec.htm +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - -
Execute a statement on the currently open database.
- -return_bool = dbexec(command_str)
- -return_bool - True if successful, else false
- -command_str - Statement to send to the database
- -True if successful.
- -Unlike dbexecstmt(), dbexec() - executes a statement in modular fashion anytime a database is open. It - allocates a statement handle, sends the statement, then closes its statement - handle.
- -@CODE
- -dbopen("test","root","mypassword");
- -dbexec("INSERT INTO abc (name, number) VALUES('Joe','0013');");
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/dbexecstmt.htm b/Help/helps/dbexecstmt.htm deleted file mode 100644 index 5ab8c41..0000000 --- a/Help/helps/dbexecstmt.htm +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - -
Execute a statement with the currently open statement handle.
- -return_bool = dbexecstmt(command_str)
- -return_bool - True if successful, else false
- -command_str - Statement to send to the database
- - - -- -
True if successful.
- -Unlike dbexec(), dbexecstmt() - assumes there is a currently open statement handle. NLP++ - currently allows only a single statement handle to be active at a time.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("INSERT INTO abc (name, number) VALUES('Jane','0011');");
- -dbexecstmt("INSERT INTO abc (name, number) VALUES('Joe','0013');");
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/dbfetch.htm b/Help/helps/dbfetch.htm deleted file mode 100644 index 3b84828..0000000 --- a/Help/helps/dbfetch.htm +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - -
Fetch a row from the current database result.
- -return_bool = dbfetch()
- -return_bool - True if successful, else false
- -True if successful.
- -Assumes that preceding calls to dbbindcol() have bound NLP++ variables - to database columns of the table that has been queried.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("SELECT * FROM employee;");
- -dbbindcol(1,"varchar",50,&G("employee name"),&G("result1"));
- -while (dbfetch())
- -{
- -"output.txt" << "employee name: ";
- -if (G("result1"))
- -"output.txt" << G("employee name") << "\n";
- -else
- -"output.txt" << "NULL" << "\n";
- -}
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/dbfreestmt.htm b/Help/helps/dbfreestmt.htm deleted file mode 100644 index bcb9839..0000000 --- a/Help/helps/dbfreestmt.htm +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - -
Free the statement handle for the currently open database.
- -returnedBool = dbfreestmt()
- -returnedBool - type: bool
True if successful.
- -NLP++ database functions assume only one statement handle is open at - a time. In - addition, one can call dbexec() - to execute a statement in a separate fashion.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("INSERT INTO employee (name, age) VALUES('John Smith','32');");
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- - - - diff --git a/Help/helps/dbopen.htm b/Help/helps/dbopen.htm deleted file mode 100644 index fde33af..0000000 --- a/Help/helps/dbopen.htm +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - -
Open a database.
- -return_bool = dbopen(db_str, user_str, password_str)
- -return_bool - True if successful, else false
- -db_str - Name of the database, as known to the ODBC manager
- -user_str - Name of database account (may be optional)
- -password_str - Password for database account (may be optional)
-
True if successful.
- -Open a database connection. NLP++ - currently allows only one database to be open at a time.
- -@CODE
- -dbopen("test","root","mypassword");
- -dballocstmt();
- -dbexecstmt("SELECT * FROM table;");
- -dbbindcol(1,"varchar",50,&G("employee name"),&G("result1"));
- -while (dbfetch())
- -{
- -"output.txt" << "employee name: ";
- -if (G("result1"))
- -"output.txt" << G("employee name") << "\n";
- -else
- -"output.txt" << "NULL" << "\n";
- -}
- -dbfreestmt();
- -dbclose();
- -@@CODE
- -- -
- -
- - - - diff --git a/Help/helps/deaccent.htm b/Help/helps/deaccent.htm deleted file mode 100644 index 6a3be62..0000000 --- a/Help/helps/deaccent.htm +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - -
Convert string to remove accented characters.
- -returnedString = deaccent(string)
- -returnedString - type: str
-string - type: str
String with accented characters converted to non-accented variants.
- -Enable C++ source code debugging for VisualText developers.
- -NULL = debug()
- -Enables VisualText developers to set a breakpoint in a particular rule, - from a C++ development environment, e.g. MS Visual C++.
- -@POST
-debug();
-@RULES
-_xNIL <- _xNIL @@
- - - - diff --git a/Help/helps/default.css b/Help/helps/default.css deleted file mode 100644 index 70966b9..0000000 --- a/Help/helps/default.css +++ /dev/null @@ -1,205 +0,0 @@ -/*=(===============================================================)*/ - -/*=(===============================================================)*/ -/*=(Created with RoboEditor.)=======================================*/ -/*=(===============================================================)*/ - -BODY { - font-family: Arial; - background-color: #ffffff; -} - -H1 { - font-family: Arial; - font-size: 18.0pt; - color: #008080; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H1 { - font-family: Arial; - font-size: 18.0pt; - color: #008080; -} -/*}}end!kadov=======================================================*/ - - - -H2 { - font-family: Arial; - font-weight: normal; - font-size: 14.0pt; - color: #008080; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H2 { - font-family: Arial; - font-weight: normal; - font-size: 14.0pt; - color: #008080; -} -/*}}end!kadov=======================================================*/ - - - -H3 { - font-weight: bold; - font-size: 14.0pt; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H3 { - font-weight: bold; - font-size: 14.0pt; -} -/*}}end!kadov=======================================================*/ - - - -H4 { - font-weight: bold; - font-size: 12.0pt; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H4 { - font-weight: bold; - font-size: 12.0pt; -} -/*}}end!kadov=======================================================*/ - - - -H5 { - font-size: 12.0pt; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H5 { - font-size: 12.0pt; -} -/*}}end!kadov=======================================================*/ - - - -H6 { - font-size: 12.0pt; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-H6 { - font-size: 12.0pt; -} -/*}}end!kadov=======================================================*/ - - - -P { - font-size: 10.0pt; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-P { - font-size: 10.0pt; -} -/*}}end!kadov=======================================================*/ - - - -P.Description { - font-family: Arial; - font-size: 8.0pt; - text-transform: none; - color: #000000; - vertical-align: baseline; - word-spacing: normal; - letter-spacing: normal; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-P-CDescription { - font-family: Arial; - font-size: 8.0pt; - text-transform: none; - color: #000000; - word-spacing: normal; - letter-spacing: normal; -} -/*}}end!kadov=======================================================*/ - - - -P.color-bullets { - list-style-type: disc; - color: #0000ff; -} - -/*=(Generated Code)=================================================*/ -/*=(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)===================*/ -/*begin!kadov{{=====================================================*/ -LI.kadov-P-Ccolor-bullets { - list-style-type: disc; - color: #0000ff; -} -/*}}end!kadov=======================================================*/ - - - -A.expandspot { - cursor: hand; - color: #008000; - font-style: normal; -} - -SPAN.expandtext { - color: #ff0000; - font-weight: normal; - font-style: italic; -} - -A.dropspot { - cursor: hand; - font-size: 10pt; - font-weight: bold; - font-style: normal; - color: #0000ff; -} - -A.glossterm { - cursor: hand; - color: #800000; - font-style: normal; -} - -SPAN.glosstext { - color: #0000ff; - font-weight: normal; - font-style: italic; -} - -DIV.droptext { - font-size: 8pt; - color: #000000; - margin-left: 0.25in; - margin-right: 0in; -} - - -/*=(===============================================================)*/ diff --git a/Help/helps/dejunk.htm b/Help/helps/dejunk.htm deleted file mode 100644 index 0a49860..0000000 --- a/Help/helps/dejunk.htm +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - -
Convert string to remove accented and extended ASCII/ANSI characters.
- -returnedString = dejunk(string)
- -returnedString - type: str
-string - type: str
String with characters converted to non-accented variants or to question - marks if no ASCII/ANSI equivalent is readily apparent. This - function helps clean up "junk" for things like XML readers that - break on control characters. Some - chars replaced with question mark ('?'), quote chars, and so on.
- -- - - - diff --git a/Help/helps/dictfindword.htm b/Help/helps/dictfindword.htm deleted file mode 100644 index ad31bdd..0000000 --- a/Help/helps/dictfindword.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - -
Find dictionary concept wordString - in the dictionary hierarchy of KB, return handle to concept.
- -returnedConcept = dictfindword(wordString)
- -returnedConcept - type: con
-wordString - type: str
Handle to the word concept if wordString - is found in the dictionary, NULL otherwise.
- -The dictionary is a specialized part of the KB hierarchy used to store - and lookup word forms. You can see it with the KB editor, under concept > sys > dict.
- -@CODE
-"output.txt" << "1 " << conceptname(addword("hello")) << "\n";
-"output.txt" << "2 " << conceptname(wordindex("hello")) << "\n";
-"output.txt" << "3 " << findwordpath("hello") << "\n";
-"output.txt" << "4 " << findwordpath("olleh") << "\n";
-"output.txt" << "5 " << wordpath("foobaz") << "\n";
-"output.txt" << "6 " << conceptname(dictfindword("hello")) << \n";
-rmword("foobaz");
Prints out:
- -1 hello
-2 he
-3 "concept" "sys" "dict" "a" "h" "he" "hello"
-4
-5 "concept" "sys" "dict" "a" "f" "fo" "foobaz"
-6 hello
findwordpath, wordindex, - wordpath, Knowledge - Base Functions
- -- -
- - - - diff --git a/Help/helps/dictfirst.htm b/Help/helps/dictfirst.htm deleted file mode 100644 index ff769d6..0000000 --- a/Help/helps/dictfirst.htm +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - -
Fetch the first word in the KB dictionary hierarchy.
- -wordConcept = dictfirst()
- -wordConcept - type: con
- -The first word-concept in lexicographic traversal of the KB dictionary - hierarchy.
- -The dictionary is a specialized part of the KB hierarchy used to store - and lookup words. dictfirst - and dictnext provide a convenient way to traverse the dictionary without - worrying about the details of its implementation. (I.e., - the presence of layers of dictionary indexing concepts.)
- -@CODE
- -L("con") = dictfirst();
- -while (L("con"))
- -{
- -"output.txt" << conceptname(L("con") << "\n";
- -L("con") = dictnext(L("con"));
- -}
- -Prints a list of the dictionary entries, one per line.
- -dictnext, Knowledge - Base Functions
- -- - - - diff --git a/Help/helps/dictgetword.htm b/Help/helps/dictgetword.htm deleted file mode 100644 index 2e514e3..0000000 --- a/Help/helps/dictgetword.htm +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - -
Find else add dictionary concept wordString - to the KB dictionary hierarchy. Return - the concept.
- -returnedWordConcept = dictgetword(wordString)
- -returnedWordConcept - type: con
-wordString - type: str
The newly created word concept. If the word cannot be added, returns - 0.
- -The dictionary is a specialized part of the KB hierarchy used to store - and lookup words.
- -See addword.
- -addword, wordindex, - wordpath, rmword, - Knowledge Base Functions
- -- - - - diff --git a/Help/helps/dictnext.htm b/Help/helps/dictnext.htm deleted file mode 100644 index a0da524..0000000 --- a/Help/helps/dictnext.htm +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - -
Fetch the word after the given word in the KB dictionary hierarchy.
- -wordConcept = dictnext(currwordConcept)
- -wordConcept - type: con
- -currwordConcept - type: con
- -The next word-concept in lexicographic traversal of the KB dictionary - hierarchy.
- -The dictionary is a specialized part of the KB hierarchy used to store - and lookup words. dictfirst - and dictnext provide a convenient way to traverse the dictionary without - worrying about the details of its implementation. (I.e., - the presence of layers of dictionary indexing concepts.)
- -@CODE
- -L("con") = dictfirst();
- -while (L("con"))
- -{
- -"output.txt" << conceptname(L("con") << "\n";
- -L("con") = dictnext(L("con"));
- -}
- -Prints a list of the dictionary entries, one per line.
- -dictfirst, Knowledge - Base Functions
- - - - diff --git a/Help/helps/down.htm b/Help/helps/down.htm deleted file mode 100644 index ca4446e..0000000 --- a/Help/helps/down.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - -Fetch first child of given concept.
- -returnedConcept = down(currentConcept)
- -returnedConcept - type: con
-currentConcept - type: con
First child concept.
- -If currentConcept is a bad concept, a warning is written to output log. - If there is no child of currentConcept, a warning is written to the output - log.
- -
Run the following code using the KB shown above:
- -@CODE
-# Find 'mother' in the KB
-G("First") = findhierconcept("mother", findroot());
-# goto parent concept (female)
-G("Second") = up(G("First"));
-"output.txt" << conceptname(G("Second")) << "\n";
-# go back down to 'mother'
-G("First") = down(G("Second"));
-"output.txt" << conceptname(G("First")) << "\n";
-# find mother's first sibling, which should be 'daughter'
-G("Second") = next(G("First"));
-"output.txt" << conceptname(G("Second")) << "\n";
-# find daughter's previous sibling, which should be mother
-G("First") = prev(G("Second"));
-"output.txt" << conceptname(G("First")) << "\n";
The output should look like:
- -female
-mother
-daughter
-mother
up, prev, next, - Knowledge Base Functions
- -