这是indexloc提供的服务,不要输入任何密码
Skip to content

SQL lock fixes, SQL parallelism, misc config #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/opencog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ MODULES = opencog/server/libbuiltinreqs.so,
# need it.
# opencog/persist/zmq/events/libatomspacepublishermodule.so

SCM_PRELOAD = atomspace/core_types.scm,
SCM_PRELOAD = scm/config.scm,
atomspace/core_types.scm,
spacetime/spacetime_types.scm,
nlp/types/nlp_types.scm,
dynamics/attention/attention_types.scm,
embodiment/AtomSpaceExtensions/embodiment_types.scm,
# viterbi/viterbi_types.scm,
scm/apply.scm,
scm/debug.scm,
scm/file-utils.scm,
scm/persistence.scm,
scm/repl-shell.scm,
Expand Down
18 changes: 18 additions & 0 deletions opencog/nlp/learn/misc-scripts/config-fr.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;
; config-fr.scm
;
; French parser config
; General cog-server configuration, for scheme.
;
;--------------------------------------------------------------
; Turn on debugging prints -- this generally makes life easier.
(turn-on-debugging)

;--------------------------------------------------------------
; The scheme shell listen port.
(define shell-port 18002)

;--------------------------------------------------------------
; The relex server host and port
(define relex-server-host "10.1.1.4")
(define relex-server-port 4444)
18 changes: 18 additions & 0 deletions opencog/nlp/learn/misc-scripts/config-lt.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;
; config-lt.scm
;
; Lithuanian parser config
; General cog-server configuration, for scheme.
;
;--------------------------------------------------------------
; Turn on debugging prints -- this generally makes life easier.
(turn-on-debugging)

;--------------------------------------------------------------
; The scheme shell listen port.
(define shell-port 18001)

;--------------------------------------------------------------
; The relex server host and port
(define relex-server-host "10.1.1.4")
(define relex-server-port 4444)
18 changes: 18 additions & 0 deletions opencog/nlp/learn/misc-scripts/config-pl.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;
; config-pl.scm
;
; Polish parser config
; General cog-server configuration, for scheme.
;
;--------------------------------------------------------------
; Turn on debugging prints -- this generally makes life easier.
(turn-on-debugging)

;--------------------------------------------------------------
; The scheme shell listen port.
(define shell-port 18003)

;--------------------------------------------------------------
; The relex server host and port
(define relex-server-host "10.1.1.4")
(define relex-server-port 4444)
65 changes: 65 additions & 0 deletions opencog/nlp/learn/misc-scripts/opencog-fr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# This file provides an example configuration for a production OpenCog
# server. Particularly noteworthy is the list of automatically loaded
# modules.
#
SERVER_PORT = 17003
LOG_FILE = cogserver-fr.log

# Other possible log levels are "error", "warn", "info", "debug" and "fine"
# LOG_LEVEL = debug
LOG_LEVEL = info
LOG_TO_STDOUT = false
SERVER_CYCLE_DURATION = 100
IDLE_CYCLES_PER_TICK = 3

# Economic Attention Allocation parameters
STARTING_STI_FUNDS = 10000
STARTING_LTI_FUNDS = 10000
STI_FUNDS_BUFFER = 10000
LTI_FUNDS_BUFFER = 10000
MIN_STI = -400

# Use this command PROMPT when telnet/terminal doesn't support ANSI
PROMPT = "opencog-fr> "
# Prompt with ANSI color codes
ANSI_PROMPT = "opencog-fr> "
# Use this guile PROMPT when telnet/terminal doesn't support ANSI
SCM_PROMPT = "guile-fr> "
# Prompt with ANSI color codes
ANSI_SCM_PROMPT = "guile-fr> "
# Global option so that modules know whether they should output ANSI color
# codes
ANSI_ENABLED = true

# Cogserver in OSX will automatically change .so extension to .dylib
# if .so exists.
MODULES = opencog/server/libbuiltinreqs.so,
opencog/persist/sql/libpersist.so,
opencog/query/libquery.so,
opencog/shell/libscheme-shell.so,
opencog/nlp/types/libnlp-types.so


SCM_PRELOAD = scm/config-fr.scm,
atomspace/core_types.scm,
spacetime/spacetime_types.scm,
nlp/types/nlp_types.scm,
dynamics/attention/attention_types.scm,
scm/persistence.scm,
scm/utilities.scm,
scm/apply.scm,
scm/file-utils.scm,
nlp/scm/type-definitions.scm,
nlp/scm/config.scm,
nlp/scm/file-utils.scm,
nlp/scm/nlp-utils.scm,
nlp/scm/disjunct-list.scm,
nlp/scm/processing-utils.scm,
nlp/learn/link-pipeline.scm

# Database login credentials. Change these to reflect your actual setup!
STORAGE = "learn-fr"
STORAGE_USERNAME = "linas"
STORAGE_PASSWD = "asdf"
#
12 changes: 6 additions & 6 deletions opencog/nlp/learn/misc-scripts/opencog-lt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ LTI_FUNDS_BUFFER = 10000
MIN_STI = -400

# Use this command PROMPT when telnet/terminal doesn't support ANSI
PROMPT = "opencog> "
PROMPT = "opencog-lt> "
# Prompt with ANSI color codes
ANSI_PROMPT = "opencog> "
ANSI_PROMPT = "opencog-lt> "
# Use this guile PROMPT when telnet/terminal doesn't support ANSI
SCM_PROMPT = "guile> "
SCM_PROMPT = "guile-lt> "
# Prompt with ANSI color codes
ANSI_SCM_PROMPT = "guile> "
ANSI_SCM_PROMPT = "guile-lt> "
# Global option so that modules know whether they should output ANSI color
# codes
ANSI_ENABLED = true
Expand All @@ -41,15 +41,15 @@ MODULES = opencog/server/libbuiltinreqs.so,
opencog/nlp/types/libnlp-types.so


SCM_PRELOAD = atomspace/core_types.scm,
SCM_PRELOAD = scm/config-lt.scm,
atomspace/core_types.scm,
spacetime/spacetime_types.scm,
nlp/types/nlp_types.scm,
dynamics/attention/attention_types.scm,
scm/persistence.scm,
scm/utilities.scm,
scm/apply.scm,
scm/file-utils.scm,
scm/debug.scm,
nlp/scm/type-definitions.scm,
nlp/scm/config.scm,
nlp/scm/file-utils.scm,
Expand Down
65 changes: 65 additions & 0 deletions opencog/nlp/learn/misc-scripts/opencog-pl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# This file provides an example configuration for a production OpenCog
# server. Particularly noteworthy is the list of automatically loaded
# modules.
#
SERVER_PORT = 17004
LOG_FILE = cogserver-pl.log

# Other possible log levels are "error", "warn", "info", "debug" and "fine"
# LOG_LEVEL = debug
LOG_LEVEL = info
LOG_TO_STDOUT = false
SERVER_CYCLE_DURATION = 100
IDLE_CYCLES_PER_TICK = 3

# Economic Attention Allocation parameters
STARTING_STI_FUNDS = 10000
STARTING_LTI_FUNDS = 10000
STI_FUNDS_BUFFER = 10000
LTI_FUNDS_BUFFER = 10000
MIN_STI = -400

# Use this command PROMPT when telnet/terminal doesn't support ANSI
PROMPT = "opencog-pl> "
# Prompt with ANSI color codes
ANSI_PROMPT = "opencog-pl> "
# Use this guile PROMPT when telnet/terminal doesn't support ANSI
SCM_PROMPT = "guile-pl> "
# Prompt with ANSI color codes
ANSI_SCM_PROMPT = "guile-pl> "
# Global option so that modules know whether they should output ANSI color
# codes
ANSI_ENABLED = true

# Cogserver in OSX will automatically change .so extension to .dylib
# if .so exists.
MODULES = opencog/server/libbuiltinreqs.so,
opencog/persist/sql/libpersist.so,
opencog/query/libquery.so,
opencog/shell/libscheme-shell.so,
opencog/nlp/types/libnlp-types.so


SCM_PRELOAD = scm/config-pl.scm,
atomspace/core_types.scm,
spacetime/spacetime_types.scm,
nlp/types/nlp_types.scm,
dynamics/attention/attention_types.scm,
scm/persistence.scm,
scm/utilities.scm,
scm/apply.scm,
scm/file-utils.scm,
nlp/scm/type-definitions.scm,
nlp/scm/config.scm,
nlp/scm/file-utils.scm,
nlp/scm/nlp-utils.scm,
nlp/scm/disjunct-list.scm,
nlp/scm/processing-utils.scm,
nlp/learn/link-pipeline.scm

# Database login credentials. Change these to reflect your actual setup!
STORAGE = "learn-pl"
STORAGE_USERNAME = "linas"
STORAGE_PASSWD = "asdf"
#
15 changes: 12 additions & 3 deletions opencog/nlp/learn/misc-scripts/ss-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@
#
# Set up assorted cnstants needed to run.

lang=lt
lang=$1
filename="$2"

splitter=/home/linas/src/relex/src/split-sentences/split-sentences.pl
splitdir=split-articles
subdir=submitted-articles

filename="$1"

# Punt if the cogserver has crashed
haveserver=`ps aux |grep cogserver |grep opencog-$lang`
if [[ -z "$haveserver" ]] ; then
exit 1
fi
haveserver=`ps aux |grep relex |grep linkgram`
if [[ -z "$haveserver" ]] ; then
exit 1
fi


# Split the filename into two parts
base=`echo $filename | cut -d \/ -f 1`
Expand All @@ -36,6 +41,10 @@ haveserver=`ps aux |grep cogserver |grep opencog-$lang`
if [[ -z "$haveserver" ]] ; then
exit 1
fi
haveserver=`ps aux |grep relex |grep linkgram`
if [[ -z "$haveserver" ]] ; then
exit 1
fi

# Move article to the done-queue
mv "$splitdir/$rest" "$subdir/$rest"
Expand Down
7 changes: 7 additions & 0 deletions opencog/nlp/learn/misc-scripts/wiki-ss-fr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
#
# Batch parsing script for French.
# Loop over all the files in 'beta-pages', sentence-split them
# and submit them for parsing.
#
time find beta-pages -type f -exec ./ss-one.sh fr "{}" \;
4 changes: 2 additions & 2 deletions opencog/nlp/learn/misc-scripts/wiki-ss-lt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Batch parsing script.
# Batch parsing script for Lithuanian.
# Loop over all the files in 'beta-pages', sentence-split them
# and submit them for parsing.
#
time find beta-pages -type f -exec ./ss-one.sh "{}" \;
time find beta-pages -type f -exec ./ss-one.sh lt "{}" \;
7 changes: 7 additions & 0 deletions opencog/nlp/learn/misc-scripts/wiki-ss-pl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
#
# Batch parsing script for Polish.
# Loop over all the files in 'beta-pages', sentence-split them
# and submit them for parsing.
#
time find beta-pages -type f -exec ./ss-one.sh pl "{}" \;
5 changes: 4 additions & 1 deletion opencog/nlp/scm/processing-utils.scm
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@
; to the "*new-parsed-sent-anchor*" via a ListLink; the set of newly added
; sentences can be fetched with the "get-new-parsed-sentences" call.
;
; The relex-server-host and port are set in config.scm, and default to
; localhost 127.0.0.1 and port 4444
;
(define (relex-parse plain-txt)

; A little short routine that sends the plain-text to the
; RelEx parser, and then loads the resulting parse into the
; atomspace (using exec-scm-from-port to do the load)
(define (do-sock-io sent-txt)
(let ((s (socket PF_INET SOCK_STREAM 0)))
(connect s AF_INET (inet-aton "127.0.0.1") 4444)
(connect s AF_INET (inet-aton relex-server-host) relex-server-port)

(display sent-txt s)
(display "\n" s) ; must send newline to flush socket
Expand Down
Loading