float= The Red Rook (cover).png

Parallel Visions: City of Angels City of Demons ebook and trade paperback available on Amazon (or here).
The question of whether Vance was dead or not became more than academic when he found himself in a bathtub up to his chin in ice water like some forgotten cocktail garnish, a demonic woman standing over him, and no memory of how he got there.
Read free chapters of Parallel Visions: City of Angels City of Demons here
The Red Rook, sequel to Dispensing Justice and the second novel of Nova Genesis World is now available for Kindle or as a paperback at Amazon.
Read free chapters of Dispensing Justice here (or get it here).
Read free chapters of The Red Rook here (or get it here). -- Fritz Freiheit

Dispensing Justice (cover).png 20th Annual Writer's Digest Self-Published Book Awards - Honorable Mention.png
Welcome to 2020! Let's get some writing done.
Track your writing progress in 2020 using this free spreadsheet.

Analysis Search Syntax

From FritzWiki
Jump to: navigation, search
http://fritzfreiheit.com/wiki/Analysis_Search_Syntax is best viewed with JavaScript turned on.
 
Article icon.svg
 v  d  e 

Warning: This is a work in progress. -- Fritz.

Analysis Search Syntax[edit]

  • Comment lines begin with # (pound sign)
  • Comment to end of the line begin with a # (pound sign)
  • Blank lines are ignored
  • Each non-blank, non-macro definition line is a search (additionally, see Breakout and Collect sections)

Constants[edit]

Any sequence of words or punctuation (except for [ and ] square brackets) matches that literal phrase.

Examples:

the pen is mightier than the sword
word of mouth

Blocks[edit]

Blocks are enclosed by [ and ] (square brackets). Additional search specifications, such as (wordsep) and be included within the square brackets.

Example:

[knock(wordsep)off]

Or blocks[edit]

Enclosed by [ and ] (square brackets) and separated with | (vertical bar)

Examples:

early to bed[, | ]early to rise[, | ]makes a man healthy[, | ]wealthy[, | ]and wise
everything [but|including|and] the kitchen sink

Inner blocks[edit]

Back references[edit]

Breakout[edit]

Breakout label phrases can be derived from regular expressions by adding a line to the regular expression file with of the form breakout_ + breakout id, such as:

breakout_namephrase=^\\W*(\\w.*\\w)\\W*$ "$1"

Collect[edit]

Comment tags[edit]

Group[edit]

Hidden[edit]

Import file[edit]

Example:

#import "MacroDefinitions.(words).txt"

Macro definitions[edit]

  • Ending a macro name with : (colon) causes the display label to be enclosed in parenthesis.
  • Embedding a - (dash) in the name causes the dash and the following part of the name (not including another dash) to be trimmed from the display label.
[define:macroname=macro]
[define:macroname:=macro] --> naming convention which will label as "(macroname)"
[defineall:macroname=macro]
[defineallnouns:macroname=noun1|noun2|noun3]
[defineallnouns:macroname-noun=noun1|noun2|noun3] --> naming convention which will label as "macroname"
[definenoun:macroname=macro]
[defineverb:macroname=verb]
[defineallverbs:macroname=verb1|verb2|verb3] --> define all as tagged as verbs

Example:


Macro reference[edit]

[(:macro name)]

Mark, equal, and notequal[edit]

Modifiers[edit]

  • [(:?)]
  • [(:n-m)]

Name separator[edit]

Any of:

[(n-s)]
[(nsep)]
[(namesep)]

Phrase sets[edit]

Phrases[edit]

Regular expressions[edit]

Regular expresions are stored in the Regexp.properties file.

Replacement regular expression are of the form:

^regexp$ "replacement string"

Format of file is:

#
# Regexp.properties
#
# NOTE: (?: starts a non-capturing group
#
# http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
#
adverb-ly=^.+ly$
breakout_namephrase=^\\W*(\\w.*\\w)\\W*$ "$1"
breakout_word3=^(\\w+(?:'s|s')?)\\W+(\\w+(?:'s|s')?)\\W+(\\w+(?:'s|s')?)$ "$1 $2 $3"
noun-ism=^.+ism$
markup=^\\s*[^\\(][^\\(\\d].*$
paragraphnumbers=^\\s*\\(\\d.*\\)\\s*$
tabs=^\\t+$
spaces=^[ \\t]+$
spaces2plus=^[ \\t][ \\t]+$
verb-ed=^.+ed$
whitespaceplus=^\\s+$
whitespace2plus=^\\s\\s+$

Regular expression tokens[edit]

Regular expressions can be applied to subsets of tokens. These include:

  • punctuation tokens
  • skip (i.e. markup) tokens
  • word tokens
  • and whitespace tokens
[(regexppunc:id=regexpId)]
[(regexpskip:id=regexpId)]
[(regexpword:id=regexpId)]
[(regexpwspace:id=regexpId)]

Example:

[(regexpword:id=regexpId)]

Tags[edit]

Tags, parts of speach (NLP)[edit]

Tagged words[edit]

[(taggedword:tags=tag1|tag2)]

Whitespace[edit]

More than one whitespace character is treated as a single whitespace.

[(sp)]
[(eol)]
[(space)]

Word seperator[edit]

[(*)]

Word value[edit]

[(:wv:Word)]

Words[edit]

Stopword and notstopword[edit]

[(stopword)]
[(notstopword)]

Example files[edit]

Adjectives[edit]

#
# Adjectives.(words).txt
#
##import "MacroDefinitions.(words).txt"

##[(breakout:^:adjective:^)]
[(breakout:^taggedword:tags=JJ|JJR|JJS^)]

Adjectives in Dialogue[edit]

#
# Adjectives in Dialogue.(words).txt
#
##import "MacroDefinitions.(words).txt"

##[(breakout:^:adjective:^)]
[(breakout:^taggedword:tags=JJ|JJR|JJS&inDialogue^)]

Adverbs[edit]

#
# Adverbs.(words).txt
#
[(breakout:^taggedword:tags=RB|RBR|RBS^)]

Adverbs in Dialogue[edit]

#
# AdverbsInDialogue.(words).txt
#
[(breakout:^taggedword:tags=RB|RBR|RBS&inDialogue^)]

AdverbsLy[edit]

#
# AdverbsLy.(words).txt
#
[(breakout:^regexpword:id=adverb-ly,tags=RB|RBR|RBS^)]

AdverbsLy in Dialogue[edit]

#
# AdverbsLy in Dialogue.(words).txt
#
[(breakout:^regexpword:id=adverb-ly,tags=RB|RBR|RBS&inDialogue^)]

Cliches[edit]


Double Words[edit]

# Double Words.(words).txt
#
[define:word word:=(mark:X)(word)(sp)(equal:X)(word)]
[define:w1 w2 w1 w2:=(mark:X)(word)(sp)(mark:Y)(word)(sp)(equal:X)(word)(sp)(equal:Y)(word)]
[(breakout:^:word word:^)]
[(breakout:^:w1 w2 w1 w2:^)]

Error Phrases[edit]

#
# Error Phrases.(words).txt
#
##[(@DT) (@DT)]
a of a
a [(an-*)]
an [(a-*)]
[a the|an the]
ahold
ala
alot
alright
every since
[freefall|freefalling]
good will
is has
it's has
power-pack
pro-active
rec-room
should of
the [a|an|the|that|there]
to the to

I Verbed[edit]

#
# I Verbed.(words).txt
#
# VB  -- verb, base form"
# VBD -- verb, past tense
# VBG -- verb, gerund or present participle
# VBN -- verb, past participle
# VBP -- verb, present tense, other than 3rd person singular
# VBZ -- verb, 3rd person singular
# VP  -- verb phrase
#
[define:verb=(@VB)|(@VBD)|(@VBG)|(@VBN)|(@VBP)|(@VBZ)] # tags = macro_definition
[define:verb phrase=(@VP)]
I [(@VB)]
I [(@VBD)]
I [(@VBG)]
I [(@VBN)]
I [(@VBP)]
I [(@VBZ)]
I [(@VP)]
I [(verb)]

IsDialogueTag[edit]

#
# IsDialogueTag.(words).txt
#
[(breakout:^taggedword:tags=isDialogueTag^)]

IsDialogueTagLy[edit]

#
# IsDialogueTagLy.(words).txt
#

[(taggedword:tags=isDialogueTag) (regexpword:id=adverb-ly,tags=RB|RBR|RBS)]

MarkupNew[edit]

#
# MarkupNew.(words).txt
#
[define:markup1:=(skip)]
[define:markup:=(regexpskip:id=markup)]
[define:paragraphnumbers:=(regexpskip:id=paragraphnumbers)]

[(breakout:id=markup,^:markup:^)]
#[(:paragraphnumbers:)]
#[(hidden:id=paragraphnumbers,^:paragraphnumbers:^)]

=== Name Phrases ===
<pre>
#
# Name Phrases.(words).txt
#
[define:namephrase:={(@NNP)|(@NNPS)}{ (@NNP)| (@NNPS)}(:1-5)]
[(breakout:id=namephrase,^:namephrase:^)]

ParagraphNumbers[edit]

#
# ParagraphNumbers.(words).txt
#
[define:paragraphnumbers:=(regexpskip:id=paragraphnumbers)]
[(:paragraphnumbers:)]
#[(hidden:id=paragraphnumbers,^:paragraphnumbers:^)]

PunctuationNew[edit]

#
# PunctuationNew.(words).txt
#
[define:puncutation:=(punc)]
[(breakout:id=puncutation,^:puncutation:^)]

Verbs[edit]

#
# Verb.(words).txt
#
[define:verb, 3rd person singular-@:=(@VBZ)]                     # tags = macro_definition
[define:verb, base form-@:=(@VB)]                                # tags = macro_definition
[define:verb, gerund or present participle-@:=(@VBG)]            # tags = macro_definition
[define:verb, past participle-@:=(@VBN)]                         # tags = macro_definition
[define:verb, past tense-@:=(@VBD)]                              # tags = macro_definition
[define:verb, present tense, other than 3rd person singular-@:=(@VBP)] # tags = macro_definition

[define:to verb:=to (@VB)]                                       # tags = macro_definition

[(:verb, 3rd person singular-@:)]
[(:verb, base form-@:)]
[(:verb, gerund or present participle-@:)]
[(:verb, past participle-@:)]
[(:verb, past tense-@:)]
[(:verb, present tense, other than 3rd person singular-@:)]

[(:to verb:)]

Whitespace2plus[edit]

#
# Whitespace2plus.(words).txt
#
[define:blankline:=(eol)(eol)]

[(:blankline:)]
[(regexpwspace:id=tabs)]
[(regexpwspace:id=spaces2plus)]

ToDo[edit]

Stem[edit]

[(stem:explode)] --> stems the word and tests tokens versus stemmed value

 (e)



[[File:|right|thumbnail|50px]]

v  d  e