Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Commit a848b67

Browse files
committed
Updated documentation and client for server executable.
1 parent c5eb622 commit a848b67

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,17 @@ list of all available options.
151151
ZPar Server
152152
~~~~~~~~~~~
153153

154-
The repository provides an python XML-RPC implementation of a ZPar
154+
The package also provides an python XML-RPC implementation of a ZPar
155155
server that makes it easier to process multiple sentences and files by
156156
loading the models just once (via the ctypes interface) and allowing
157157
clients to connect and request analyses. The implementation is in the
158-
executable ``zpar_server``. The server is quite flexible and
159-
allows loading only the models that you need. Here's an example of how
160-
to start the server with only the tagger and the dependency parser
161-
models loaded:
158+
executable ``zpar_server`` that is installed when you install the
159+
package. The server is quite flexible and allows loading only the
160+
models that you need. Here's an example of how to start the server
161+
with only the tagger and the dependency parser models loaded:
162162

163163
.. code-block::
164164
165-
$> cd examples
166165
$> zpar_server --modeldir english-models --models tagger parser depparser
167166
INFO:Initializing server ...
168167
Loading tagger from english-models/tagger
@@ -178,7 +177,8 @@ Run ``zpar_server -h`` to see a list of all options.
178177

179178
Once the server is running, you can connect to it using a client. An
180179
example client is included in the file ``examples/zpar_client.py`` which
181-
can be run as follows:
180+
can be run as follows (note that if you specified a custom host and port
181+
when running the server, you'd need to specify the same here):
182182

183183
.. code-block::
184184

examples/zpar_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
test_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test.txt')
5656
tokenized_test_sentence = "Do n't you want to come to the market with me ?"
5757
tokenized_test_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_tokenized.txt')
58-
tag_outfile = 'test.tag'
59-
parse_outfile = 'test.parse'
58+
tag_outfile = os.path.join(os.getcwd(), 'test.tag')
59+
parse_outfile = os.path.join(os.getcwd(), 'test.parse')
6060

6161
logging.info('Tagging "{}"'.format(test_sentence))
6262
tagged_sent = proxy.tag_sentence(test_sentence)

0 commit comments

Comments
 (0)