Search is not available for this dataset
repo_id stringlengths 12 110 | file_path stringlengths 24 164 | content stringlengths 3 89.3M | __index_level_0__ int64 0 0 |
|---|---|---|---|
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/valuation1.val | john => b1
mary => g1
suzie => g2
fido => d1
tess => d2
noosa => n
girl => {g1, g2}
boy => {b1, b2}
dog => {d1, d2}
bark => {d1, d2}
walk => {b1, g2, d1}
chase => {(b1, g1), (b2, g1), (g1, d1), (g2, d2)}
see => {(b1, g1), (b2, d2), (g1, b1),(d2, b1), (g2, n)}
in => {(b1, n), (b2, n), (d2, n)}
with => {(b1, g1), (g1, b1... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/sem0.fcfg | ## Natural Language Toolkit: sem0.fcfg
##
## Minimal feature-based grammar with lambda semantics.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[SEM=<?vp(?subj)>] -> NP[SEM=?subj] VP[SEM=?vp]
VP[SEM=?v] -> V[SEM=?v]
NP[SEM=<... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/background0.fol | ## Natural Language Toolkit: background0.fol
##
## Illustration of simple knowledge base for use with inference tools.
## To accompany sem4.fcfg
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
all x. (boxerdog(x) -> dog(x))
all x. (boxer(x... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/gluesemantics.fcfg | % start S
#############################
# Grammar Rules
#############################
# S expansion rules
S -> NP[num=?n, case=nom] VP[num=?n]
S -> S CC[sem=cc_clause] S
# NP expansion rules
NP[num=?n, gender=?g] -> Det[num=?n] N[num=?n, gender=?g]
NP[num=?n, gender=?g] -> PropN[num=?n, gender=?g]
NP[num=?n, case=?c... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/sql.fcfg | ## Natural Language Toolkit: sql.fcfg
##
## Deliberately naive string-based grammar for
## deriving SQL queries from English
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[sem=(?np + ?vp)] -> NP[sem=?np] VP[sem=?vp]
VP[sem... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/dep_test2.dep | 1 John _ NNP _ _ 2 SUBJ _ _
2 sees _ VB _ _ 0 ROOT _ _
3 a _ DT _ _ 4 SPEC _ _
4 dog _ NN _ _ 2 OBJ _ _
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/sem1.fcfg | ## Natural Language Toolkit: sem1.fcfg
##
## Minimal feature-based grammar to illustrate the interpretation of
## determiner phrases.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[SEM = <?subj(?vp)>] -> NP[SEM=?subj] VP[SEM... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/drt_glue_event.semtype | ########################################################################
# DRT-Glue Semantics Formulas Using DRT and Event Representation
#
# Entries are made up of three parts, separated by colons (":")
#
# 1) The semtype name.
# - May appear multiple times with different relationship sets (3)
# - May "extend" ... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/bindop.fcfg | ## Natural Language Toolkit: sem0.fcfg
##
## Feature-based grammar that divides the semantics for each element
## into two pieces: the core semantics, with path ('SEM','CORE'), and a set of
## binding operators, with path ('SEM','BO'). Each binding operator is encoded
## as a lambda-calculus expression <bo(expr, @var)... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/glue.semtype | ########################################################################
# Glue Semantics Formulas Using Event Representation
#
# Entries are made up of three parts, separated by colons (":")
#
# 1) The semtype name.
# - May appear multiple times with different relationship sets (3)
# - May "extend" other semtyp... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/glue_event.semtype | ########################################################################
# Glue Semantics Formulas Using Event Representation
#
# Entries are made up of three parts, separated by colons (":")
#
# 1) The semtype name.
# - May appear multiple times with different relationship sets (3)
# - May "extend" other semtyp... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/sem2.fcfg | ## Natural Language Toolkit: sem2.fcfg
##
## Longer feature-based grammar with more quantifers, and illustrating
## transitive verbs and prepositional phrases (PPs). The
## interpretation of PPs is a bit weird and could do with further
## work.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourcef... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/np.fcfg | % start NP
NP[AGR=?a] -> Det[AGR=?a] N[AGR=?a]
Det[AGR=[NUM='sg', PER=3]] -> 'this' | 'that'
Det[AGR=[NUM='pl', PER=3]] -> 'these' | 'those'
Det[AGR=[NUM='pl', PER=1]] -> 'we'
Det[AGR=[PER=2]] -> 'you'
N[AGR=[NUM='sg', GND='m']] -> 'boy'
N[AGR=[NUM='pl', GND='m']] -> 'boys'
N[AGR=[NUM='sg', GND='f']] -> 'girl'
N[AGR=[N... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/chat_pnames.fcfg |
##################################################################
# Lexical rules automatically generated by running 'chat80.py -x'.
##################################################################
PropN[num=sg, sem=<\P.P(abidjan)>] -> 'Abidjan'
PropN[num=sg, sem=<\P.P(abu_dhabi)>] -> 'Abu_Dhabi'
PropN[num=sg, s... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/glue_train.conll | 1 John _ NNP _ _ 2 SUBJ _ _
2 runs _ VB _ _ 0 ROOT _ _
1 a _ DT _ _ 2 SPEC _ _
2 man _ NN _ _ 3 SUBJ _ _
3 runs _ VB _ _ 0 ROOT _ _
1 John _ NNP _ _ 2 SUBJ _ _
2 sees _ VB _ _ 0 ROOT _ _
3 Mary _ NNP _ _ 2 OBJ _ _
1 every _ DT _ _ 2 SPEC _ _
2 girl _ NN _ _ 3 SUBJ _ _
3 chases _ VB _ _ 0 ROOT _ _
4 an _ DT _ _ 5 SPE... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/chat80.fcfg | ## Natural Language Toolkit: chat80.fcfg
##
##
## Grammar used to illustrate querying the Chat-80 database.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
# ###########################
# Grammar Rules
# ########################... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/toy.cfg | S -> NP VP
PP -> P NP
NP -> Det N | NP PP
VP -> V NP | VP PP
Det -> 'a' | 'the'
N -> 'dog' | 'cat'
V -> 'chased' | 'sat'
P -> 'on' | 'in'
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/event.fcfg | ## Natural Language Toolkit: event.fcfg
##
## Illustrating Davidson-style event semantics
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
############################
# Grammar Rules
#############################
S[sem = <exist... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/drt_glue.semtype | ########################################################################
# DRT-Glue Semantics Formulas Using DRT and Event Representation
#
# Entries are made up of three parts, separated by colons (":")
#
# 1) The semtype name.
# - May appear multiple times with different relationship sets (3)
# - May "extend" ... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/sample_grammars/hole.fcfg | ## Natural Language Toolkit: hole.fcfg
##
## Minimal feature-based grammar with lambda semantics for use by the hole.py
## module for Hole Semantics (see Blackburn and Bos).
##
## Author: Dan Garrette <DHGarrette@gmail.com>
## Robin Cooper <robin.cooper@ling.gu.se>
## URL: <http://nltk.org>
## For license inf... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque1.regexp | NP: {<IZE.*>+<ADJ.*>*<DET.*>*} """ # adjetibo edo determinatzaileei loturiko izenak nahiz izen segidak topatzen ditu
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque5.regexp | IS: {(<ADJ.*>*<DET.*>*<IZE.*>*<ADJ.*>*<DET.*>*)*} #noun phrase chunks
AS: {(<ADI.*|ADL.*|ADT.*>+)+<POST.*>*} # verb phrase chunks
PS: {<POST.*>+} # prepositional phrase chunks
S: {<IS><AS>}
{<AS><IS>} # Chunk NP, VP
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque4.regexp | IS: {(<ADJ.*>*<DET.*>*<IZE.*>+<ADJ.*>*<DET.*>*)*} #noun phrase chunks
AS: {(<ADI.*|ADL.*|ADT.*>*)+} # verb phrase chunks
PS: {<POST.*>+} # prepositional phrase chunks
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque1.fcfg | % start AS
# ############################
# Grammar Rules
# ############################
# AS expansion rules
AS[ergnum=?n1, absnum=?n2] -> IS[kas=erg, num=?n1] AS[ergnum=?n1, absnum=?n2]
AS[ergnum=?n1, absnum=?n2] -> AS[ergnum=?n1, absnum=?n2] IS[kas=erg, num=?n1]
AS[ergnum=?n1, absnum=?n2] -> IS[kas=abs, num=?n2] AS... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque3.cfg | IS -> IZE_ARR | IZE_ARR ADJ | IS LOT IS
IZE_ARR -> 'gizon' | 'emakume' | 'ume' | IZE_ARR LOT IZE_ARR
ADJ -> 'zaharrak' | 'gazteak'
LOT -> 'eta' | 'edo'
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque2.cfg | S -> is as
is -> ize adj | ior
ize -> 'gaizkile' | 'epaile' | 'bizilagun'
adj -> 'gaiztoek' | 'gaiztoak' | 'kanpotarrak' | 'kanpotarrek' | 'berriak' | 'berriek'
ior -> 'haiek' | 'hark'
as -> mendekoa as | adlg mendekoa as | adlg adlg mendekoa as | adi adl
mendekoa -> adlg mendekoa | adlg adlg mendekoa | 'joatea'... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque2.regexp | NP: {<IZE.*><ADJ.*>*<DET.*>*} # adjetibo edo determinatzaileei loturiko izenak topatzen ditu
NP: {<IZE.*>+} # izen segidak topatzen ditu
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque3.fcfg | % start S
# ############################
# Grammar Rules
# ############################
## NORK-NOR Kasuak
S -> IS[kas=erg] AS/IS
# IS erregelak
IS[kas=?k, num=?n] -> ize[azp=arr] knmdek[kas=?k, num=?n]
IS[kas=?k, num=?n] -> ize[azp=ber] knmdek[kas=?k, num=?n]
IS[kas=?k, num=?n]/IS ->
# AS erregelak
AS[ergnum=?n1, ... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque1.pcfg | as -> mendekoa as [0.15]
as -> adlg mendekoa as [0.31]
as -> adlg adlg mendekoa as [0.08]
as -> adi adl [0.46]
mendekoa -> adlg mendekoa [0.37]
mendekoa -> adlg adlg mendekoa [0.09]
mendekoa -> 'joatea' [0.18]
mendekoa -> 'joateko' [0.27]
mendekoa -> 'sartzera' [0.09]
adi -> 'esan' [0.5]
adi -> 'debekatzen' ... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque2.pcfg | IS -> IZE_ARR [0.5] | IZE_ARR ADJ [0.3] | IS LOT IS [0.2]
IZE_ARR -> 'gizon' [0.1] | 'emakume' [0.2] | 'ume' [0.3] | IZE_ARR LOT IZE_ARR [0.4]
ADJ -> 'zaharrak' [0.4] | 'gazteak' [0.6]
LOT -> 'eta' [0.9] | 'edo' [0.1]
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque3.regexp | IS:
{<.*>+} # Edozer Onartzen Duen Chunkerra
}<ADI.*|ADL.*|ADT.*|PUNT.*|POST.*|LOT.*|ADB.*>+{ # Chink Bezala Barneratu Aditzak (ADI.*, ADT.* eta ADL.*), Adberbioak (ADB.*), Preposizioak (POST.*), Loturak (LOT.*) Eta Puntuazio Ikurrak (PUNT.*)
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque2.fcfg | % start S
# ############################
# Grammar Rules
# ############################
S -> IS[kas=erg] AS/IS
# IS erregelak
IS[kas=?k, num=?n] -> ize[azp=arr] knmdek[kas=?k, num=?n]
IS[kas=?k, num=?n] -> ize[azp=ber] knmdek[kas=?k, num=?n]
IS[kas=?k, num=?n]/IS ->
# AS erregelak
AS[ergnum=?n1, absnum=?n2]/?x -> IS[ka... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/basque_grammars/basque1.cfg | P -> IS AS
AS -> IS ADI
AS -> ADI
IS -> IM erl_atz
IM -> ize_arr
IM -> ize_izb
ADI -> adt
erl_atz -> "k" | "a"
ize_arr -> "ardo" | "egunkari" | "baloi"
ize_izb -> "Pintxo" | "Kepa"
adt -> "dakar" | "darama"
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/simple-sem.fcfg | ## Natural Language Toolkit: sem3.fcfg
##
## Alternative simple grammar with transitive verbs and
## quantifiers for the book.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
############################
# Grammar Rules
#####... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/discourse.fcfg | ## Natural Language Toolkit: discourse.fcfg
##
## Grammar to illustrate simple 2-3 sentence discourse processing.
##
## Developed as an extension of sem3.fcfg
## Main additions:
## - a few more lexical entries (including 'no' and 'the')
## - 'is', 'does' and auxiliary negation
## - Predicate categories, including predi... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/drt.fcfg | ## Natural Language Toolkit: drt.fcfg
##
## Author: Dan Garrette <dhgarrette@gmail.com>
## URL: <http://nltk.orgt>
## For license information, see LICENSE.TXT
% start S
############################
# Grammar Rules
#############################
S[SEM = <app(?subj,?vp)>] -> NP[NUM=?n,SEM=?subj] VP[NUM=?n,SEM=?vp]
NP... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/storage.fcfg | ## Natural Language Toolkit: storage.fcfg
##
## Feature-based grammar that implements Cooper storage by dividing the
## semantics for each phrase into two pieces: the core semantics
## ('SEM','CORE') and a sequence of binding operators ('SEM','STORE').
## Each binding operator is encoded as a logic term <bo(quant, var)... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/sql1.fcfg | ## Natural Language Toolkit: sql.fcfg
##
## Deliberately naive string-based grammar for
## deriving SQL queries from English
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[SEM=(?np + WHERE + ?vp)] -> NP[SEM=?np] VP[SEM=?vp]... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/german.fcfg | ## Natural Language Toolkit: german.fcfg
##
## Example of a feature-based grammar for German, illustrating
## CASE and AGR features (PER, GND, NUM) working as a bundle.
## Used in Feature-Based Grammars chapter.
##
## Author: Michaela Atterer <atterer@ims.uni-stuttgart.de>
## Ewan Klein <ewan@inf.ed.ac.uk>
#... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/feat0.fcfg | ## Natural Language Toolkit: feat0.fcfg
##
## First example of a feature-based grammar for English, illustrating
## value-sharing of NUM and TENSE features.
## Used in Feature-Based Grammars chapter.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LIC... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/feat1.fcfg | ## Natural Language Toolkit: feat1.fcfg
##
## Second example of a feature-based grammar, illustrating
## SUBCAT and slash features. Also introduces SBar and embedded
## clauses.
## Used in Feature-Based Grammars chapter.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/background.fol | ## Natural Language Toolkit: background1.fol
##
## Illustration of simple knowledge base for use with inference tools.
## To accompany sem4.fcfg
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
all x. (boxerdog(x) -> dog(x))
all x. (boxer(x... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/book_grammars/sql0.fcfg | ## Natural Language Toolkit: sql.fcfg
##
## Deliberately naive string-based grammar for
## deriving SQL queries from English
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[SEM=(?np + WHERE + ?vp)] -> NP[SEM=?np] VP[SEM=?vp]... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish3.cfg | SN -> N | N Adj | SN Conj SN
N -> 'hombres' | 'mujeres' | 'niños' | N Conj N
Adj -> 'mayores' | 'jovenes'
Conj -> 'y' | 'o' | 'e'
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish2.pcfg | SN -> N [0.5]| N Adj [0.3]| SN Conj SN [0.2]
N -> 'hombres' [0.1]| 'mujeres' [0.2]| 'niños' [0.3]| N Conj N [0.4]
Adj -> 'mayores' [0.3]| 'jovenes' [0.7]
Conj -> 'y' [0.6]| 'o' [0.3] | 'e' [0.1]
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish4.regexp |
SN: {<d.*>?<n.*>+<a.*>*} # noun phrase chunks
SV: {<p.*>?<v.*>} # verb phrase chunks
SP: {<sp.*>} # prepositional phrase chunks
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish1.fcfg | % start S
# ############################
# Grammar Rules
# ############################
S -> SN[num=?n,gen=?g] SV[num=?n,tiempo=?t]
SN[num=?n,gen=?g,+PROP] -> NP[num=?n]
SN[num=?n,gen=?g,-PROP] -> DET[num=?n,gen=?g] NC[num=?n,gen=?g]
SN[num=plural,gen=?g,-PROP] -> DET[num=plural,gen=?g] NC[num=plural,gen=?g]
SV[tiempo=... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish2.cfg | S -> SN SV
SP -> P SN
SN -> Det N | SN SP
SV -> V SN | SV SP
Det -> "el" | "la" | "un" | "una" | "los" | "las"
N -> "tren" | "telescopio" | "noticia" | "mesa" | "hombre" | "casa" | "amiga"
V -> "vio" | "leí" | "encontró"
P -> "en" | "sobre" | "con" | "de" | "a"
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish1.pcfg | S -> SN SV [1.0]
SV -> VTrans SN [0.4]
SV -> VIntrans [0.3]
SV -> VSupl SN SN [0.3]
VTrans -> "bebió" [1.0]
VIntrans -> "murió" [1.0]
VSupl -> "regaló" [1.0]
SN -> "flores" [0.6]
SN -> "agua" [0.4]
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish2.fcfg | % start S
# ############################
# Grammar Rules
# ############################
S -> SN S/SN
S/?x -> SV/?x
S/?x -> V[+aux] COMP SV/?x
SN/SN ->
SV/?x -> V[-aux] SN/?x
# ############################
# Lexical Rules
# ############################
V[-aux] -> 'adoras' | 'odias'
V[+aux] -> 'dices'
SN -> 'quien' | ... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish2.regexp |
NP: {<d.*>*<n.*><a.*>*} # Busca det + nombre + adjetivo
NP: {<d.*>*<n.*>+} # Busca seguidas de nombres
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish1.cfg | S -> SN SV
SV -> v SN
SV -> v
SN -> det GN
GN -> nom_com
GN -> nom_prop
det -> "el" | "la" | "los" | "las" | "un" | "una" | "unos" | "unas"
nom_com -> "vecino" | "ladrones" | "mujeres" | "bosques" | "noche" | "flauta" | "ventana"
nom_prop -> "Jose" | "Lucas" | "Pedro" | "Marta"
v -> "toca" | "moja" | "adoran... | 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish1.regexp |
NP: {<d.*>*<n.*>+<a.*>*} # busca determinantes y adjetivos que acompañen a nombres
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish3.regexp |
SN:
{<.*>+} # Crea Un Chunk Con Cualquier Cosa
}<v.*|sp.*|F.*>+{ # Considerar Como Chink Apariciones De Verbos (v.*), Preposiciones (sp.*) y Signos De Puntuación (F.*)
| 0 |
public_repos/nltk_teach/examples/grammars | public_repos/nltk_teach/examples/grammars/spanish_grammars/spanish5.regexp |
SN: {<d.*>?<n.*>+<a.*>*} # noun phrase chunks
SV: {<p.*>?<v.*>+<SN|sp.*|S>*} # verb phrase chunks
SP: {<sp.*>} # prepositional phrase chunks
S: {<SN><SV>} # Chunk NP, VP
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/generate.py | from words import *
telephone_words = read_words('corpus/telephone.txt')
model = train(telephone_words)
generate(model)
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/parse1.py | from parser import *
grammar = """
NP -> P | D J N
D -> 'a'
J -> 'red' | 'green'
N -> 'chair' | 'house'
"""
phrase = 'a red chair'
parse_draw(phrase, grammar)
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/categories.py | from __future__ import print_function
from words import *
from nltk.wordnet import *
from operator import itemgetter
import nltk
import re
from string import join
def build_word_associations():
cfd = nltk.ConditionalFreqDist()
# get a list of all English stop words
stopwords_list = nltk.corpus.stopwords.... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/count.py | from words import *
words = read_words('corpus/telephone.txt')
counts = count_words(words)
print_freq(counts)
from words import *
words = read_words('corpus/rural.txt')
counts = count_pairs(words)
print_freq(counts)
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/README | The files in this directory were created for teaching computational
linguistics in secondary school English classes. For instructions
and lesson plans, please see http://nltk.org/index.php/Electronic_Grammar
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/parser.py | from __future__ import print_function
import nltk
def parse(sent, grammar):
gr = nltk.parse_cfg(grammar)
parser = nltk.parse.ChartParse(gr, nltk.parse.TD_STRATEGY)
return parser.get_parse_list(sent.split())
def parse_draw(sent, grammar):
trees = parse(sent, grammar)
nltk.draw.draw_trees(*trees)
... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/words.py | from __future__ import print_function
import re, random
from collections import defaultdict
###############################################################################
### FILE ACCESS
###############################################################################
def read_words(filename):
"Get the words out... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/parse3.py | from parser import *
grammar = """
S -> NP VP | VP
PP -> P NP
NP -> N | Det N | N N | NP PP | N VP
VP -> V | V NP | VP PP | VP ADVP
ADVP -> ADV NP
Det -> 'a' | 'an' | 'the'
N -> 'flies' | 'banana' | 'fruit' | 'arrow' | 'time'
V -> 'like' | 'flies' | 'time'
P -> 'on' | 'in' | 'by'
ADV -> '... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/parse2.py | from parser import *
grammar = """
S -> NP VP | VP
VP -> V NP | VP PP
NP -> Det N | NP PP
PP -> P NP
NP -> 'I'
Det -> 'the' | 'my'
N -> 'elephant' | 'pajamas'
V -> 'shot'
P -> 'in'
"""
sent = 'I shot the elephant in my pajamas'
parse_draw(sent, grammar)
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/school/search.py | from words import *
words = read_text('corpus/telephone.txt')
concordance(" um", words)
| 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/sem2.cfg | ## Natural Language Toolkit: sem2.cfg
##
## Longer feature-based grammar with more quantifers, and illustrating
## transitive verbs and prepositional phrases (PPs). The
## interpretation of PPs is a bit weird and could do with further
## work.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourcefo... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/chat_sentences | # Natural Language Toolkit: Demo Sentences
#
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
############################################
# Some example sentences for the Chat-80 demo
what is the capital of France
which sea borders France
what contains Berl... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/sem0.cfg | ## Natural Language Toolkit: sem0.cfg
##
## Minimal feature-based grammar with lambda semantics.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[sem = <app(?vp,?subj)>] -> NP[sem=?subj] VP[sem=?vp]
VP[sem=?v] -> V[sem=?v]
NP[... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/sem3.cfg | ## Natural Language Toolkit: sem3.cfg
##
## First attempt at HPSG-style feature-based semantics.
## This version doesn't work properly!
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[sem=?vp] -> NP[sem=?np] VP[subj=?np, sem=... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/syn2sem.py | # Natural Language Toolkit: Parsers
#
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
from __future__ import print_function
"""
Demo of how to combine the output of parsing with evaluation in a model.
Use 'python syn2sem.py -h' to find out the various opti... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/sem1.cfg | ## Natural Language Toolkit: sem1.cfg
##
## Minimal feature-based grammar to illustrate the interpretation of
## determiner phrases.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
S[sem = <app(?subj,?vp)>] -> NP[sem=?subj] VP[... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/model0.py | # Natural Language Toolkit: Example Model
#
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
This is a sample model to accompany the U{sem2.cfg} grammar, and is
intended to be imported as a module.
"""
from nltk.sem import *
#Initialize a valuation of ... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/chat_pnames.cfg |
##################################################################
# Lexical rules automatically generated by running 'chat80.py -x'.
##################################################################
PropN[num=sg, sem=<\P.(P abidjan)>] -> 'Abidjan'
PropN[num=sg, sem=<\P.(P abu_dhabi)>] -> 'Abu_Dhabi'
PropN[num=sg,... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/demo_sentences | # Natural Language Toolkit: Demo Sentences
#
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
############################################
# Some example sentences for the sem2.cfg demo
Fido sees a boy with Mary
John sees Mary
every girl chases a dog
every b... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/model1.py | # Natural Language Toolkit: Example Model
#
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
This is a sample model to accompany the U{chat80.cfg} grammar} and is
intended to be imported as a module.
"""
from nltk.semantics import *
from nltk.corpora im... | 0 |
public_repos/nltk_teach/examples | public_repos/nltk_teach/examples/semantics/chat80.cfg | ## Natural Language Toolkit: chat80.cfg
##
##
## Grammar used to illustrate querying the Chat-80 database.
##
## Author: Ewan Klein <ewan@inf.ed.ac.uk>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
% start S
# ###########################
# Grammar Rules
# #########################... | 0 |
public_repos | public_repos/numpy/pytest.ini | [pytest]
addopts = -l
norecursedirs = doc tools numpy/linalg/lapack_lite numpy/_core/code_generators
doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS ALLOW_UNICODE ALLOW_BYTES
junit_family=xunit2
filterwarnings =
error
# Filter out annoying import messages.
ignore:Not importing directory
ignore:numpy.dt... | 0 |
public_repos | public_repos/numpy/environment.yml | # To use:
#
# $ conda env create -f environment.yml # `mamba` works too for this command
# $ conda activate numpy-dev
#
name: numpy-dev
channels:
- conda-forge
dependencies:
- python=3.9 #need to pin to avoid issues with builds
- cython>=3.0
- compilers
- openblas
- nomkl
- setuptools=59.2.0
- ninj... | 0 |
public_repos | public_repos/numpy/.mailmap | # Prevent git from showing duplicate names with commands like "git shortlog"
# See the manpage of git-shortlog for details.
# The syntax is:
# Name that should be used <email that should be used> Bad name <bad email>
#
# You can skip Bad name if it is the same as the one that should be used, and is unique.
#
# This fil... | 0 |
public_repos | public_repos/numpy/release_requirements.txt | # These packages are needed for a release in addition to those needed
# for building, testing, and the creation of documentation.
# download-wheels.py
urllib3
beautifulsoup4
# changelog.py
pygithub
gitpython>=3.1.30
# uploading wheels
twine
# building and notes
Paver
# uploading release documentation
packaging
| 0 |
public_repos | public_repos/numpy/.coveragerc | [run]
branch = True
include = */numpy/*
disable_warnings = include-ignored
| 0 |
public_repos | public_repos/numpy/LICENSE.txt | Copyright (c) 2005-2023, NumPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and... | 0 |
public_repos | public_repos/numpy/pavement.py | r"""
This paver file is intended to help with the release process as much as
possible. It relies on virtualenv to generate 'bootstrap' environments as
independent from the user system as possible (e.g. to make sure the sphinx doc
is built against the built numpy, not an installed one).
Building changelog + notes
=====... | 0 |
public_repos | public_repos/numpy/LICENSES_bundled.txt | The NumPy repository and source distributions bundle several libraries that are
compatibly licensed. We list these here.
Name: lapack-lite
Files: numpy/linalg/lapack_lite/*
License: BSD-3-Clause
For details, see numpy/linalg/lapack_lite/LICENSE.txt
Name: dragon4
Files: numpy/_core/src/multiarray/dragon4.c
License:... | 0 |
public_repos | public_repos/numpy/meson.build | project(
'NumPy',
'c', 'cpp', 'cython',
version: run_command(
# This should become `numpy/_version.py` in NumPy 2.0
['numpy/_build_utils/gitversion.py'],
check: true).stdout().strip(),
license: 'BSD-3',
meson_version: '>=1.2.99', # version in vendored-meson is 1.2.99
default_options: [
'bui... | 0 |
public_repos | public_repos/numpy/azure-steps-windows.yml | steps:
- script: git submodule update --init
displayName: 'Fetch submodules'
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: python -m pip install --upgrade pip wheel
displayName: 'Install tools'
- script: python -m pip install... | 0 |
public_repos | public_repos/numpy/.ctags.d | --langmaps=c:+.src
| 0 |
public_repos | public_repos/numpy/.codecov.yml | codecov:
notify:
require_ci_to_pass: no
after_n_builds: 1
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
changes: false
comment: off
| 0 |
public_repos | public_repos/numpy/.clang-format | # A clang-format style that approximates Python's PEP 7
# Useful for IDE integration
#
# Based on Paul Ganssle's version at
# https://gist.github.com/pganssle/0e3a5f828b4d07d79447f6ced8e7e4db
# and modified for NumPy
BasedOnStyle: Google
AlignAfterOpenBracket: Align
AllowShortEnumsOnASingleLine: false
AllowShortIfState... | 0 |
public_repos | public_repos/numpy/CITATION.bib | @ARTICLE{2020NumPy-Array,
author = {Harris, Charles R. and Millman, K. Jarrod and
van der Walt, Stéfan J and Gommers, Ralf and
Virtanen, Pauli and Cournapeau, David and
Wieser, Eric and Taylor, Julian and Berg, Sebastian and
Smith, Nathaniel J. and Kern, Robert and Pic... | 0 |
public_repos | public_repos/numpy/.cirrus.star | # The guide to programming cirrus-ci tasks using starlark is found at
# https://cirrus-ci.org/guide/programming-tasks/
#
# In this simple starlark script we simply check conditions for whether
# a CI run should go ahead. If the conditions are met, then we just
# return the yaml containing the tasks to be run.
load("ci... | 0 |
public_repos | public_repos/numpy/azure-pipelines.yml | trigger:
# start a new build for every push
batch: False
branches:
include:
- main
- maintenance/*
pr:
branches:
include:
- '*' # must quote since "*" is a YAML reserved character; we want a string
stages:
- stage: Check
jobs:
- job: Skip
pool:
vmImage: 'ubuntu-... | 0 |
public_repos | public_repos/numpy/build_requirements.txt | meson-python>=0.13.1
Cython>=3.0
ninja
spin==0.7
build
| 0 |
public_repos | public_repos/numpy/test_requirements.txt | Cython
wheel==0.38.1
setuptools==59.2.0 ; python_version < '3.12'
setuptools ; python_version >= '3.12'
hypothesis==6.81.1
pytest==7.4.0
pytz==2023.3
pytest-cov==4.1.0
meson
pytest-xdist
# for numpy.random.test.test_extending
cffi; python_version < '3.10'
# For testing types. Notes on the restrictions:
# - Mypy... | 0 |
public_repos | public_repos/numpy/pyproject.toml | [build-system]
build-backend = "mesonpy"
requires = [
"meson-python>=0.15.0",
"Cython>=3.0",
]
[project]
name = "numpy"
version = "2.0.0.dev0"
# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88)
license = {file = "LICENSE.txt"}
description = "Fundamental package for array computing in P... | 0 |
public_repos | public_repos/numpy/INSTALL.rst | Building and installing NumPy
+++++++++++++++++++++++++++++
**IMPORTANT**: the below notes are about building NumPy, which for most users
is *not* the recommended way to install NumPy. Instead, use either a complete
scientific Python distribution (recommended) or a binary installer - see
https://scipy.org/install.htm... | 0 |
public_repos | public_repos/numpy/THANKS.txt | Travis Oliphant for the NumPy core, the NumPy guide, various
bug-fixes and code contributions.
Paul Dubois, who implemented the original Masked Arrays.
Pearu Peterson for f2py, numpy.distutils and help with code
organization.
Robert Kern for mtrand, bug fixes, help with distutils, code
organization, strided... | 0 |
public_repos | public_repos/numpy/README.md | <h1 align="center">
<img src="https://raw.githubusercontent.com/numpy/numpy/main/branding/logo/primary/numpylogo.svg" width="300">
</h1><br>
[](
https://numfocus.org)
[
option('lapack', type: 'string', value: 'auto',
description: 'Option for LAPACK library selection. By default, try to find any in the order give... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.