<commit_before>
(define-module (opencog nlp))

(use-modules (opencog) (opencog atom-types))

; User-modifiable config paramters.
(define relex-server-host "127.0.0.1")
(define relex-server-port 4444)

; Load various parts....
(load "nlp/nlp-utils.scm")
(load "nlp/disjunct-list.scm")
(load "nlp/processing-utils.scm")<commit_msg>add function for setting ip/port of relex server<commit_after>
(define-module (opencog nlp))

(use-modules (opencog) (opencog atom-types))

; User-modifiable config paramters.
(define relex-server-host "127.0.0.1")
(define relex-server-port 4444)

(define-public (relex-server-host! ip)
"
  Set the relex-server's ip. By default it is 127.0.0.1.

  ip:
  - A string specifying the ip
"
    (if (not (string? ip)) (error "Expected the ip to be a string, got: " ip))
    (set! relex-server-host ip)
)

(define-public (relex-server-port! port)
"
  Set the port number for the relex-server. By default it is 4444

  port:
  - A number specifying the port number
"
    (if (not (number? port))
        (error "Expected the ip to be a number, got:" port))
    (set! relex-server-port port)
)

; Load various parts....
(load "nlp/nlp-utils.scm")
(load "nlp/disjunct-list.scm")
(load "nlp/processing-utils.scm")
{'fraction_non_alphanumeric': 0.15097402597402598, 'fraction_numerical': 0.024350649350649352, 'mean_word_length': 3.7061068702290076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7284643', 'n_tokens_mistral': 488, 'n_tokens_neox': 466, 'n_words': 132}