load_dd: Load deepdive dump to SQL database

Description Usage Arguments Examples

Description

Takes a raw SQL file and loads it into a Postgres database.

Usage

1
2
load_dd(con, bib, sent, bib_name = "publications", sent_name = "sentences",
  clean = TRUE)

Arguments

con

An object returned from dbConnect()

bib

A bibjson file exported from GeoDeepDive.

sent

A set of parsed sentence files from the NLP output.

bib_name

The name for the bibliography table in the database.

sent_name

The name for the sentence table in the database.

clean

Should rows in an existing database be removed?

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
library(geodiveR)
library(RPostgreSQL)
  con <- dbConnect(drv = "PostgreSQL",
                   user = "postgres",
                   password = "postgres",
                   host = "localhost",
                   port = "5432",
                   dbname = "deepdive")

  # Using the package's data:
  data(nlp)
  data(publications)

  # Or alternately a string to the file path:
  # nlp <- "./data/sentences_nlp352"
  # publications <- "./data/bibjson"

  load_dd(con, bib = publications, sent = nlp)

## End(Not run)

EarthCubeGeochron/geodiveR documentation built on May 25, 2019, 8:29 p.m.