This repository was archived by the owner on Sep 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,18 +151,17 @@ list of all available options.
151151ZPar 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
155155server that makes it easier to process multiple sentences and files by
156156loading the models just once (via the ctypes interface) and allowing
157157clients 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
179178Once the server is running, you can connect to it using a client. An
180179example 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
Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments