# =============================================================================
# File:    conjunctions.txt
# Author:  Aaron Hosford
# Created: 6/10/2012
#
# Copyright (c) Aaron Hosford 2012
# =============================================================================
#
# Description:
#
#   TODO: Write a description & examples.
#
# =============================================================================
#
# Modification History:
#
#   6/10/2012:
#     - Created this file.
#
# =============================================================================

# I'm letting *anything* match as third person. This is overgeneral, but some
# people actually talk this way, and we need to be able to parse it even if
# it's not technically correct.
subject(third,plural,-singular,-nor,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    and[head(and)]                              # the conjunctive phrase has the "and" property iff its head does
    or[head(or)]                                # the conjunctive phrase has the "or" property iff its head does
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "second" property iff at least one term does
    
    # [<noun phrase>, ...,] <noun phrase>[,] and/or <noun phrase>
    +subject <CASE *conjunction(and)|conjunction(or) CASE> subject(-delimited) # You and I are...
    +object <CASE *conjunction(and)|conjunction(or) CASE> object(-delimited) # You and me are...

subject(or,third,singular,-plural,-and,-nor,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<noun phrase>, ...,] <noun phrase>[,] or <noun phrase>
    +subject <CASE *conjunction(or) CASE> subject(-delimited)
    +object <CASE *conjunction(or) CASE> object(-delimited)

# "nor" requires the presence of other negatives
nor_subject(nor,third,plural,-singular,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "scond" property iff at least one term does
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +subject(-negative) <EXCEPTION *conjunction(nor) EXCEPTION> subject(-negative,-delimited)
    +object(-negative) <EXCEPTION *conjunction(nor) EXCEPTION> object(-negative,-delimited)

nor_subject(nor,third,singular,-plural,-and,-or,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +subject <EXCEPTION *conjunction(nor) EXCEPTION> subject(-delimited)
    +object <EXCEPTION *conjunction(nor) EXCEPTION> object(-delimited)
    
#subject(nor,-and,-or,-but,-neither):
#    not[head(not)]
#    neither[head(neither)]
#    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
#    second,plural[any_term(second,plural)]
#    third,plural[any_term(third,plural)]
#    first,singular[any_term(first,singular)]
#    second,singular[any_term(second,singular)]
#    third,singular[any_term(third,singular)]
#    
#    # [<positive noun phrase>
#    -subject(-not,-but,-delimited) <CASE *conjunction(not) CASE> nor_subject(nor,-not,-but,-delimited)

subject(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    +subject(not,-but) <CASE *conjunction(nor) EXCEPTION> subject(-not,-but,-delimited)
    +subject(not,-but) <CASE *conjunction(nor) EXCEPTION> object(-not,-but,-delimited)

# We use CASE instead of EXCEPTION for "but" because we require a "not" phrase
# to designate which is the exception, and it comes with its own EXCEPTION
# links.
subject(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]                             # exactly one term must have the "not" property to match
    delimited[last_term(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    subject(-delimited)|object(-delimited) <CASE *conjunction(but) CASE> subject(-delimited)|object(-delimited)
    subject(delimited)|object(delimited) <CASE *conjunction(but) CASE> subject(delimited)|object(delimited)

subject(not,-and,-or,-nor,-but,-either,-neither):
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    -subject(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> subject(-not,-but,-delimited)
    -object(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> object(-not,-but,-delimited)
    subject(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> subject(-not,-but,delimited)
    object(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> object(-not,-but,delimited)


   












# I'm letting *anything* match as third person. This is overgeneral, but some
# people actually talk this way, and we need to be able to parse it even if
# it's not technically correct.
object(third,plural,-singular,-nor,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    and[head(and)]                              # the conjunctive phrase has the "and" property iff its head does
    or[head(or)]                                # the conjunctive phrase has the "or" property iff its head does
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "scond" property iff at least one term does
    
    # [<noun phrase>, ...,] <noun phrase>[,] and/or <noun phrase>
    +object <CASE *conjunction(and)|conjunction(or) CASE> object(-delimited) # You and me are...

object(or,third,singular,-plural,-and,-nor,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<noun phrase>, ...,] <noun phrase>[,] or <noun phrase>
    +object <CASE *conjunction(or) CASE> object(-delimited)

# "nor" requires the presence of other negatives
nor_object(nor,third,plural,-singular,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "scond" property iff at least one term does
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +object(-negative) <EXCEPTION *conjunction(nor) EXCEPTION> object(-negative,-delimited)

nor_object(nor,third,singular,-plural,-and,-or,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +object <EXCEPTION *conjunction(nor) EXCEPTION> object(-delimited)
    
#object(nor,-and,-or,-but,-neither):
#    not[head(not)]
#    neither[head(neither)]
#    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
#    second,plural[any_term(second,plural)]
#    third,plural[any_term(third,plural)]
#    first,singular[any_term(first,singular)]
#    second,singular[any_term(second,singular)]
#    third,singular[any_term(third,singular)]
#    
#    # [<positive noun phrase>
#    -object(-not,-but,-delimited) <CASE *conjunction(not) CASE> nor_object(nor,-not,-but,-delimited)

object(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    +object(not,-but) <CASE *conjunction(nor) EXCEPTION> object(-not,-but,-delimited)

# We use CASE instead of EXCEPTION for "but" because we require a "not" phrase
# to designate which is the exception, and it comes with its own EXCEPTION
# links.
object(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]                             # exactly one term must have the "not" property to match
    delimited[last_term(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    object(-delimited) <CASE *conjunction(but) CASE> object(-delimited)
    object(delimited) <CASE *conjunction(but) CASE> object(delimited)

object(not,-and,-or,-nor,-but,-either,-neither):
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    -object(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> object(-not,-but,-delimited)
    object(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> object(-not,-but,delimited)


    
    
    








# I'm letting *anything* match as third person. This is overgeneral, but some
# people actually talk this way, and we need to be able to parse it even if
# it's not technically correct.
target(third,plural,-singular,-nor,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    and[head(and)]                              # the conjunctive phrase has the "and" property iff its head does
    or[head(or)]                                # the conjunctive phrase has the "or" property iff its head does
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "scond" property iff at least one term does
    
    # [<noun phrase>, ...,] <noun phrase>[,] and/or <noun phrase>
    +target <CASE *conjunction(and)|conjunction(or) CASE> target(-delimited) # You and me are...

target(or,third,singular,-plural,-and,-nor,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<noun phrase>, ...,] <noun phrase>[,] or <noun phrase>
    +target <CASE *conjunction(or) CASE> target(-delimited)

# "nor" requires the presence of other negatives
nor_target(nor,third,plural,-singular,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    first[any_term(first)]                      # the conjunctive phrase has the "first" property iff at least one term does
    second[any_term(second)]                    # the conjunctive phrase has the "scond" property iff at least one term does
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +target(-negative) <EXCEPTION *conjunction(nor) EXCEPTION> target(-negative,-delimited)

nor_target(nor,third,singular,-plural,-and,-or,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    first[any_term(first,singular)]             # the conjunctive phrase has the "first" property iff at least one term has both the "first" and "singular" properties
    second[any_term(second,singular)]           # the conjunctive phrase has the "second" property iff at least one term has both the "second" and "singular" properties
    
    # [<positive noun phrase>, ...,] <positive noun phrase>[,] nor <positive noun phrase>
    +target <EXCEPTION *conjunction(nor) EXCEPTION> target(-delimited)
    
#target(nor,-and,-or,-but,-neither):
#    not[head(not)]
#    neither[head(neither)]
#    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
#    second,plural[any_term(second,plural)]
#    third,plural[any_term(third,plural)]
#    first,singular[any_term(first,singular)]
#    second,singular[any_term(second,singular)]
#    third,singular[any_term(third,singular)]
#    
#    # [<positive noun phrase>
#    -target(-not,-but,-delimited) <CASE *conjunction(not) CASE> nor_target(nor,-not,-but,-delimited)

target(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    +target(not,-but) <CASE *conjunction(nor) EXCEPTION> target(-not,-but,-delimited)

# We use CASE instead of EXCEPTION for "but" because we require a "not" phrase
# to designate which is the exception, and it comes with its own EXCEPTION
# links.
target(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]                             # exactly one term must have the "not" property to match
    delimited[last_term(delimited)]
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    target(-delimited) <CASE *conjunction(but) CASE> target(-delimited)
    target(delimited) <CASE *conjunction(but) CASE> target(delimited)

target(not,-and,-or,-nor,-but,-either,-neither):
    first,plural[any_term(first,plural)]        # the conjunctive phrase has the "first" and "plural" properties iff at least one term has them both
    second,plural[any_term(second,plural)]
    third,plural[any_term(third,plural)]
    first,singular[any_term(first,singular)]
    second,singular[any_term(second,singular)]
    third,singular[any_term(third,singular)]
    
    -target(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> target(-not,-but,-delimited)
    target(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> target(-not,-but,delimited)

    

   
   
   
   
   
   
 
 
 
 


prepositional_phrase(-nor,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    and[head(and)]                              # the conjunctive phrase has the "and" property iff its head does
    or[head(or)]                                # the conjunctive phrase has the "or" property iff its head does
    
    +prepositional_phrase <CASE *conjunction(and)|conjunction(or) CASE> prepositional_phrase(-delimited)

# "nor" requires the presence of other negatives
nor_prepositional_phrase(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]                       # compound leadups must be delimited in order to match
    
    +prepositional_phrase(-negative) <EXCEPTION *conjunction(nor) EXCEPTION> prepositional_phrase(-negative,-delimited)

nor_prepositional_phrase(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited) any_term(singular)]    # compound leadups must be delimited and at least one term must be singular to match
    
    +prepositional_phrase <EXCEPTION *conjunction(nor) EXCEPTION> prepositional_phrase(-delimited)
    
prepositional_phrase(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    
    +prepositional_phrase(not,-but) <CASE *conjunction(nor) EXCEPTION> prepositional_phrase(-not,-but,-delimited)

# We use CASE instead of EXCEPTION for "but" because we require a "not" phrase
# to designate which is the exception, and it comes with its own EXCEPTION
# links.
prepositional_phrase(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]                             # exactly one term must have the "not" property to match
    delimited[last_term(delimited)]
    
    prepositional_phrase(-delimited) <CASE *conjunction(but) CASE> prepositional_phrase(-delimited)
    prepositional_phrase(delimited) <CASE *conjunction(but) CASE> prepositional_phrase(delimited)

prepositional_phrase(not,-and,-or,-nor,-but,-either,-neither):
    
    -prepositional_phrase(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> prepositional_phrase(-not,-but,-delimited)
    prepositional_phrase(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> prepositional_phrase(-not,-but,delimited)

    
    








happening(-nor,-but,-not,-either,-neither):
    [compound(delimited)]
    and[head(and)]
    or[head(or)]
    +happening <CASE *conjunction(and)|conjunction(or) CASE> happening

nor_happening(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]
    +happening(-not) <EXCEPTION *conjunction(nor) EXCEPTION> happening(-not,-delimited)

happening(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    +happening(not,-but) <CASE *conjunction(nor) EXCEPTION> happening(-not,-but,-delimited)

happening(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]
    delimited[last_term(delimited)]
    happening(-delimited) <CASE *conjunction(but) CASE> happening(-delimited)
    happening(delimited) <CASE *conjunction(but) CASE> happening(delimited)

happening(not,-and,-or,-nor,-but,-either,-neither):
    -happening(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> happening(-not,-but,-delimited)
    happening(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> happening(-not,-but,delimited)





accomplishment(-nor,-but,-not,-either,-neither):
    [compound(delimited)]
    and[head(and)]
    or[head(or)]
    +accomplishment <CASE *conjunction(and)|conjunction(or) CASE> accomplishment

nor_accomplishment(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]
    +accomplishment(-not) <EXCEPTION *conjunction(nor) EXCEPTION> accomplishment(-not,-delimited)

accomplishment(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    +accomplishment(not,-but) <CASE *conjunction(nor) EXCEPTION> accomplishment(-not,-but,-delimited)

accomplishment(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]
    delimited[last_term(delimited)]
    accomplishment(-delimited) <CASE *conjunction(but) CASE> accomplishment(-delimited)
    accomplishment(delimited) <CASE *conjunction(but) CASE> accomplishment(delimited)

accomplishment(not,-and,-or,-nor,-but,-either,-neither):
    -accomplishment(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> accomplishment(-not,-but,-delimited)
    accomplishment(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> accomplishment(-not,-but,delimited)






ability(-nor,-but,-not,-either,-neither):
    [compound(delimited)]
    and[head(and)]
    or[head(or)]
    +ability <CASE *conjunction(and)|conjunction(or) CASE> ability

nor_ability(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]
    +ability(-not) <EXCEPTION *conjunction(nor) EXCEPTION> ability(-not,-delimited)

ability(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    +ability(not,-but) <CASE *conjunction(nor) EXCEPTION> ability(-not,-but,-delimited)

ability(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]
    delimited[last_term(delimited)]
    ability(-delimited) <CASE *conjunction(but) CASE> ability(-delimited)
    ability(delimited) <CASE *conjunction(but) CASE> ability(delimited)

ability(not,-and,-or,-nor,-but,-either,-neither):
    -ability(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> ability(-not,-but,-delimited)
    ability(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> ability(-not,-but,delimited)







experience(-nor,-but,-not,-either,-neither):
    [compound(delimited)]
    and[head(and)]
    or[head(or)]
    +experience <CASE *conjunction(and)|conjunction(or) CASE> experience

nor_experience(nor,-and,-or,-but,-not,-either,-neither):
    [compound(delimited)]
    +experience(-not) <EXCEPTION *conjunction(nor) EXCEPTION> experience(-not,-delimited)

experience(nor,-and,-or,-but,-either,-neither):
    [compound(delimited)]
    +experience(not,-but) <CASE *conjunction(nor) EXCEPTION> experience(-not,-but,-delimited)

experience(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]
    delimited[last_term(delimited)]
    experience(-delimited) <CASE *conjunction(but) CASE> experience(-delimited)
    experience(delimited) <CASE *conjunction(but) CASE> experience(delimited)

experience(not,-and,-or,-nor,-but,-either,-neither):
    -experience(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> experience(-not,-but,-delimited)
    experience(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> experience(-not,-but,delimited)




    
    
    
    
    
    
intention(-and,-or,-nor,-but,-either,-neither):
    -intention(-not,-but,-delimited) <CASE *conjunction(not) EXCEPTION> intention(-not,-but,-delimited)
    intention(-not,-but,delimited) <CASE *conjunction(not) EXCEPTION> intention(-not,-but,delimited)
    
    
    

    
    
sentence(and,-or,-nor,-but,-not,-either,-neither):
    [compound(delimited)]
    +sentence(-terminated) <CASE *conjunction(and) CASE> sentence(-delimited,-terminated)

sentence(but,-and,-or,-nor,-not,-either,-neither):
    [one_term(not,single)]
    delimited[last_term(delimited)]
    sentence|intention(not) <CASE *conjunction(but) CASE> sentence(-delimited,-terminated)

 
    
# TODO: Other sentence conjunctions
    
    
# TODO: "but" to join a negative intention with a sentence. Example: "Not to change the subject, but I'm getting sleepy."



