Skip to content

Commit

Permalink
version 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard Desgraupes authored and cran-robot committed Jun 12, 2016
1 parent 48b3387 commit 29b9e2a
Show file tree
Hide file tree
Showing 29 changed files with 2,087 additions and 1,143 deletions.
338 changes: 0 additions & 338 deletions COPYING

This file was deleted.

18 changes: 9 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Package: rcqp
Type: Package
Title: Interface to the Corpus Query Protocol
Version: 0.3
Date: 2012-05-04
Version: 0.4
Date: 2016-06-10
Author: Bernard Desgraupes <bernard.desgraupes@u-paris10.fr>, Sylvain
Loiseau <sylvain.loiseau@univ-paris13.fr>
Maintainer: Sylvain Loiseau, University of Paris 13
<sylvain.loiseau@univ-paris13.fr>
Maintainer: Bernard Desgraupes <bernard.desgraupes@u-paris10.fr>
Depends: R (>= 1.8.0), plyr
Suggests: reshape
Description: implements Corpus Query Protocol functions based on the
Description: Implements Corpus Query Protocol functions based on the
CWB software. Rely on CWB (GPL v2), PCRE (BSD licence), glib2
(LGPL).
License: GPL-2
Lazyload: yes
License: GPL-2 | file LICENCE
LazyLoad: yes
URL: http://www.r-project.org
Collate: main.R zzz.R s3.R
Encoding: latin1
SystemRequirements: GNU make, pcre (>= 7), glib2 (>= 2)
Packaged: 2012-10-18 19:49:23 UTC; sylvainloiseau
OS_type: unix
NeedsCompilation: yes
Packaged: 2016-06-10 13:36:24 UTC; bernardo
Repository: CRAN
Date/Publication: 2012-10-19 08:11:55
Date/Publication: 2016-06-12 19:08:49
48 changes: 25 additions & 23 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
851ad702230a95dbaa4828ff1a03fe10 *COPYING
32f9d52212de9cda275301335bc3df13 *DESCRIPTION
e219b293aa2e7bcdfe35752c2f32c947 *DESCRIPTION
99bbfbb6df74b9ca3376ef74bf9797f9 *INSTALL
b424e201f1ff29cdd62ab4f97a4a5e7a *LICENCE
1b436951ae586a17e8d93f01b0af0ceb *NAMESPACE
c85d6441a60d3b102940e2b21d7f04f1 *NEWS
b2a889c9d730e58fef6371017118e191 *R/main.R
09631930a54dfb9dbf75a4ce72e837bb *R/s3.R
ac323e7a0f2e34ebf2824d4f1f3ae628 *NAMESPACE
23a5a32f926c78e68e06a408204031c7 *R/main.R
f42f21c8c51afbb5405128504570592f *R/s3.R
484f7d1cfb843ac7ba78bb4541a23876 *R/zzz.R
e736f329e1a434f7ab2f9e1b4aed8c69 *README
87f207858e0037d72587ed6838ea44f9 *build/partial.rdb
f01e1e576545eafda24e5a3da852a65d *build/rcqp.pdf
5fea494a6c538cc96b13129bf4b96f20 *build/vignette.rds
78b1c5cd46baa4e4ea01e21562aece62 *cleanup
716636495a6e0a61d2ec126e91f386b8 *configure
f06343c476efaecb845d27d7152c0fca *configure.ac
4fcbc30056cfb5b923701fe96cf50726 *configure.win
d8706b47c5f497db7b07bb5a71c479ff *configure.win
be5baab27a442696358cb2e94b085582 *inst/doc/rcqp.Rnw
907661616d0db122c2abc1d39eb96997 *inst/doc/rcqp.Rnw.svg
8e05c5c651af2385e84efffcd5eee7ce *inst/doc/rcqp.pdf
1a41fe9b184d8d2e42d5db286e805ee4 *man/corpus.Rd
e33ec08e5f0aadc0952955e49852cd11 *man/cqi_attribute_size.Rd
Expand All @@ -28,23 +29,22 @@ b8319f710d86301e2774ba54a8d214aa *man/cqi_list_corpora.Rd
df801b98a3a5bfc86c642b9205da04d3 *man/cqi_query.Rd
c22488b35b223700e60192aa4eca07a3 *man/cqi_regex2id.Rd
3baa6c3870aa17b353b8ff718289709e *man/cqi_struc2cpos.Rd
3bd83e2c4cd1a40fb440a90bb11d0a8a *man/cqp_flist.Rd
d3666bd30398e8a1ffcb21c58e9f8aa1 *man/cqp_ftable.Rd
ab0f1feb79200b2968e45c05c6335d3f *man/cqp_flist.Rd
d509fe594b76e2aaa118e8365bd59a37 *man/cqp_ftable.Rd
fc93abde40f40b2342865fc4945f7535 *man/cqp_kwic.Rd
4bfd06d1261739e9a0865d470006bd24 *man/cqp_registry.Rd
819eb8133c355bdacd78883c1cb70a48 *man/print.Rd
8716d4dd7e2603a2e715aac79d1351a1 *man/rcqp.Rd
367919acd952290461332f5cea400cf6 *man/cqp_registry.Rd
0067aa9b77af843fe79d6a20074d3a6b *man/print.Rd
5144beafe8996a6d6ddfec54dc1b685b *man/rcqp.Rd
d5bb4396f9e8d4bf482c16b464db06db *man/region_sizes.Rd
75adf1c2a74b97d587085f4fad04e611 *man/size.Rd
ebc6fff2d064a27f0ab831fc7aa9ea9e *man/sort.cqp_kwic.Rd
2fb765d950f18402fe11dee975465bc6 *man/sort.cqp_kwic.Rd
e2dceed7c28e5fba17b8cc34621bd5a8 *man/subcorpus.Rd
cf440b61ea6630fd8467d22653842219 *man/subset.Rd
3fd9b9fafb807cdf24e31f2e9f96d776 *man/summary.Rd
50ec2ba45dbd5dfa846771259e245fcb *man/tokens.Rd
06f906cac37202d1a204d7790955ae1f *man/write.cqp_corpus.Rd
936c35039a5f3901afb7a8bd488a9870 *rcqp-Ex.R
e53bf23fb47f6628803e461bb0bd29de *src/MakefileCrossCompile.in
c18d056653ae22d5a2b16ad1eaeee8d4 *src/Makevars.in
10e7a0d7eb25ba6f0cdaef31b3c4a40e *src/Makevars.in
a4f6753a70d767e6b01b854eae5d7aaa *src/cwb/AUTHORS
6a949c83f5a72f825a6e1de3cda1db41 *src/cwb/CHANGES
e61a89191d5a3b466ba04ab177bef403 *src/cwb/COPYING
Expand All @@ -62,7 +62,7 @@ fcc30d196da81447fbcbf9e191d94c22 *src/cwb/MakefileRcqpCrossCompile.in
1ee58c04aaafbcb7922595bbcbf30b79 *src/cwb/cl/Makefile
b20cb7b3d0f49ce4254b116620428447 *src/cwb/cl/attributes.c
e65a5134fc7597fcaf909aa9baabb59d *src/cwb/cl/attributes.h
29e96d070c6963962cb6b6012bb6ce4e *src/cwb/cl/binsert.c
a49ddce70b2fbbca2931c041418b885e *src/cwb/cl/binsert.c
fbfe06a5046f4adc6c3674437fc9ef98 *src/cwb/cl/binsert.h
91b106cc1e6d534a55171a0daef9d366 *src/cwb/cl/bitfields.c
4da2d20ad8cd665a3f502279d44c2043 *src/cwb/cl/bitfields.h
Expand All @@ -77,7 +77,7 @@ fbfe06a5046f4adc6c3674437fc9ef98 *src/cwb/cl/binsert.h
f82909eed59330cdf85041cd1ead9cc0 *src/cwb/cl/class-mapping.h
26a7bca62cfd70f02facd1d5bf44feba *src/cwb/cl/compression.c
dbacf7d7221101da25a0009c6a072c82 *src/cwb/cl/compression.h
532a1729953bbfafbb4ebcc04c3d7987 *src/cwb/cl/corpus.c
39286d96c189798ada630a201854250d *src/cwb/cl/corpus.c
c318bc339a3d7c0a78f39cb124c7212e *src/cwb/cl/corpus.h
581a42b4e709e309d1885a556f6038f4 *src/cwb/cl/depend.mk
25d9e2f1efc96e5ae33a88a351536bdc *src/cwb/cl/dl_stub.c
Expand Down Expand Up @@ -198,7 +198,7 @@ dbdd24506b72288e871db070b8848180 *src/cwb/cqp/regex2dfa.h
ec5c987a1144231d6a22d42817cd3767 *src/cwb/cqp/symtab.c
7e9b2ae201194793bd2de7305086022f *src/cwb/cqp/symtab.h
13cd1cf536e14b681fe6a0969b79c390 *src/cwb/cqp/table.c
3283b9dc7d4a896f0429794b2f878b31 *src/cwb/cqp/table.h
aae6dba2848800a6c92d5491bcdfc586 *src/cwb/cqp/table.h
aa38ae2beeccb39c3dd45c46470933f5 *src/cwb/cqp/targets.c
2f0edf17df7efa585f1b046f5d1188a1 *src/cwb/cqp/targets.h
5da7b0b036016175b1cddc6f148c3317 *src/cwb/cqp/tree.c
Expand Down Expand Up @@ -709,7 +709,9 @@ effb5acf2359e233f0294e99d077d503 *src/cwb/utils/cwb-scan-corpus.c
abd81328237b699cacde15e9bf0a9aff *src/makeRCompatible.h
29cc30e400635666ba9f9f9827942a65 *src/makeRCompatible.txt
958a14e6824c1bb4129a19b738398046 *src/rcqp.h
a8a78d5d9f19d952270028b50dcf69bb *src/rcqpCommands.c
4ce191dbcc460019ac4198fccc449656 *src/rcqpCommands.h
0dbfe5eade038d056e9f576d4bca214d *src/rcqpUtils.c
8f2ee4b022ce468540e1cbab7a5f04f4 *src/rcqpUtils.h
c85474e1d7a535a30dfe42fc06c6a40d *src/rcqpCommands.c
66854dc03826e31017dc12e8071de3a5 *src/rcqpCommands.h
d313d735c7cb4b553ab97cd05544c4f6 *src/rcqpUtils.c
eaa0a9495d51caa961f4942449db17cc *src/rcqpUtils.h
be5baab27a442696358cb2e94b085582 *vignettes/rcqp.Rnw
907661616d0db122c2abc1d39eb96997 *vignettes/rcqp.Rnw.svg
35 changes: 29 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export(
"cqi_getRegistry",
"cqi_setRegistry",
"cqi_attribute_size",
"cqi_attributes",
"cqi_alg2cpos",
Expand All @@ -20,7 +22,6 @@ export(
"cqi_lexicon_size",
"cqi_list_corpora",
"cqi_list_subcorpora",
# "cqi_cqp",
"cqi_query",
"cqi_regex2id",
"cqi_str2id",
Expand Down Expand Up @@ -82,10 +83,32 @@ export(
"size",
"size.cqp_corpus",
"size.cqp_subcorpus"


)

# "cqi_charset",
# "cqi_idlist2cpos",
# "cqi_properties",
importFrom("plyr","count")
importFrom("utils","write.table")

S3method(cqp_flist,cqp_attr)
S3method(cqp_flist,cqp_corpus)
S3method(cqp_flist,cqp_subcorpus)
S3method(cqp_ftable,cqp_corpus)
S3method(cqp_ftable,cqp_subcorpus)
S3method(cqp_kwic,cqp_subcorpus)
S3method(nregion,cqp_attr)
S3method(ntoken,cqp_attr)
S3method(ntype,cqp_attr)
S3method(print,cqp_attr)
S3method(print,cqp_corpus)
S3method(print,cqp_flist)
S3method(print,cqp_kwic)
S3method(print,cqp_subcorpus)
S3method(regions,cqp_attr)
S3method(size,cqp_corpus)
S3method(size,cqp_subcorpus)
S3method(sort,cqp_kwic)
S3method(summary,cqp_attr)
S3method(summary,cqp_corpus)
S3method(summary,cqp_flist)
S3method(summary,cqp_subcorpus)
S3method(tokens,cqp_attr)
S3method(types,cqp_attr)
9 changes: 0 additions & 9 deletions NEWS

This file was deleted.

140 changes: 86 additions & 54 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,38 @@
# All rights reserved.
# ===========================================================================

# ##
# # ------------------------------------------------------------------------
# #
# # "concordance" --
# #
# # ------------------------------------------------------------------------
# ##
# concordance <- function(corpus, query, left.context=10, right.context=10)
# {
# ans <- .Call("rcqpCmd_concordance", corpus, query, left.context, right.context, PACKAGE="rcqp")
# return(ans)
# }


##
# ------------------------------------------------------------------------
#
# "cqi_cqp(mother, child, query)" --
# "cqi_getRegistry()" --
#
# Example:
# cqi_query("DICKENS", "Aa", '[(pos="JJ") & (lemma="modern")];')
# cqi_cqp('set Aa keyword nearest [pos="NN"] within right 5 words from match;')
# cqi_setRegistry()
#
# ------------------------------------------------------------------------
##
# cqi_cqp <- function(query) {
# # if (nchar(child) == 0) {
# #
# # } TODO check ;
# .Call("rcqpCmd_cqp", query, PACKAGE="rcqp")
# return(invisible())
# }
cqi_getRegistry <- function() {
ans <- .Call("rcqpCmd_getRegistry", PACKAGE="rcqp")
return(ans)
}


##
# ------------------------------------------------------------------------
#
# "cqi_setRegistry(path)" --
#
# Example:
# cqi_setRegistry("/opt/local/share/cwb/registry")
#
# ------------------------------------------------------------------------
##
cqi_setRegistry <- function(path) {
.Call("rcqpCmd_setRegistry", path, PACKAGE="rcqp")
return(invisible())
}


##
# ------------------------------------------------------------------------
Expand Down Expand Up @@ -219,37 +217,6 @@ cqi_fdist2 <- function(subcorpus, field1, key1, field2, key2, cutoff=0) {
}


# ##
# # ------------------------------------------------------------------------
# #
# # "cqi_charset(corpus)" --
# #
# # Currently always returns "latin1".
# #
# # ------------------------------------------------------------------------
# ##
# cqi_charset <- function(corpus) {
# ans <- .Call("rcqpCmd_charset", corpus, PACKAGE="rcqp")
# return(ans)
# }


# ##
# # ------------------------------------------------------------------------
# #
# # "cqi_properties(corpus)" --
# #
# # Example:
# #
# #
# # ------------------------------------------------------------------------
# ##
# cqi_properties <- function(corpus) {
# ans <- .Call("rcqpCmd_properties", corpus, PACKAGE="rcqp")
# return(ans)
# }


##
# ------------------------------------------------------------------------
#
Expand Down Expand Up @@ -578,5 +545,70 @@ cqi_struc2str <- function(attribute, ids) {



# ##
# # ------------------------------------------------------------------------
# #
# # "concordance" --
# #
# # ------------------------------------------------------------------------
# ##
# concordance <- function(corpus, query, left.context=10, right.context=10)
# {
# ans <- .Call("rcqpCmd_concordance", corpus, query, left.context, right.context, PACKAGE="rcqp")
# return(ans)
# }


##
# ------------------------------------------------------------------------
#
# "cqi_cqp(mother, child, query)" --
#
# Example:
# cqi_query("DICKENS", "Aa", '[(pos="JJ") & (lemma="modern")];')
# cqi_cqp('set Aa keyword nearest [pos="NN"] within right 5 words from match;')
#
# ------------------------------------------------------------------------
##
# cqi_cqp <- function(query) {
# # if (nchar(child) == 0) {
# #
# # } TODO check ;
# .Call("rcqpCmd_cqp", query, PACKAGE="rcqp")
# return(invisible())
# }


# ##
# # ------------------------------------------------------------------------
# #
# # "cqi_charset(corpus)" --
# #
# # Currently always returns "latin1".
# #
# # ------------------------------------------------------------------------
# ##
# cqi_charset <- function(corpus) {
# ans <- .Call("rcqpCmd_charset", corpus, PACKAGE="rcqp")
# return(ans)
# }


# ##
# # ------------------------------------------------------------------------
# #
# # "cqi_properties(corpus)" --
# #
# # Example:
# #
# #
# # ------------------------------------------------------------------------
# ##
# cqi_properties <- function(corpus) {
# ans <- .Call("rcqpCmd_properties", corpus, PACKAGE="rcqp")
# return(ans)
# }




6 changes: 2 additions & 4 deletions R/s3.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ===========================================================================
# File: "s3.R"
# Created: 2012-01-23 07:50:09
# Last modification: 2012-01-23 07:50:09
# Last modification: 2016-06-07 14:51:28
# Authors: Bernard Desgraupes <bernard.desgraupes@u-paris10.fr>
# Sylvain Loiseau <sylvain.loiseau@univ-paris13.fr>
# (c) Copyright: 2011-2012
# Copyright (c) 2011-2016
# All rights reserved.
# ===========================================================================

Expand All @@ -27,8 +27,6 @@
# S3 generic methods
###########################################################################



size <- function (x) UseMethod("size");
cqp_flist <- function(x, ...) UseMethod("cqp_flist");
cqp_ftable <- function(x, ...) UseMethod("cqp_ftable");
Expand Down
Binary file added build/partial.rdb
Binary file not shown.
Binary file added build/rcqp.pdf
Binary file not shown.
Binary file added build/vignette.rds
Binary file not shown.

0 comments on commit 29b9e2a

Please sign in to comment.