@@ -213,64 +213,35 @@ This will include the two views `ViewNames.POS` and `ViewNames.SRL_VERB` in the
213213
214214### Configuration Options
215215
216- The default configuration options are specified in the class
217- ` edu.illinois.cs.cogcomp.nlp.common.PipelineConfigurator ` .
218- Each property has a String as a key and a value. If you want to change specific behaviors,
219- such as activating or deactivating specific components, you can write non-default entries
220- in a configuration file and use a ResourceManager (see ` cogcomp-core-utilities ` )
221- to instantiate an instance of the pipeline (any entries
222- that duplicate default values will have no effect and are not required).
223-
224- Code snippet to show how to override default configuration with user-specified properties.
216+ If you want to change specific behaviors,
217+ such as activating or deactivating specific components, you need to write a custom config file and use
218+ it as the example below.
219+
220+ This mostly happens when you have limited resourcesΩ. For example, SRL and parsers tend to take more time and memory,
221+ so you can turn them off if you don't need them.
222+
225223``` java
226224import edu.illinois.cs.cogcomp.annotation.AnnotatorService ;
227225import edu.illinois.cs.cogcomp.core.utilities.configuration.ResourceManager ;
228226import edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory ;
229227
230- ResourceManager userConfig = new ResourceManager (" config/pipeline-config.properties" );
228+ // An example of "[PATH_TO_YOUR_CONFIG_FILE]" is "config/pipeline-config.properties"
229+ ResourceManager userConfig = new ResourceManager (" [PATH_TO_YOUR_CONFIG_FILE]" );
231230AnnotatorService pipeline = PipelineFactory . buildPipeline(userConfig);
232231```
233232
234- The default keys and values are specified below; comments provide more information where the
235- values themselves are not self-explanatory. Note that the key/value pairs each appear
236- on a separate line and are themselves separated by a tab key. If you have limited memory or wish
237- to save on processing time, you should set the values for unnecessary annotations to 'false'
238- -- in particular, SRL components require more time and memory than most other components,
239- and the parsers can take a relatively long time on long sentences.
240-
241- ```
242- // Used by PipelineFactory. If 'true', instantiates a version of the pipeline --
243- // SentencePipeline -- that where possible, processes text
244- // sentence-by-sentence to minimize failures at the document level
245- isSentenceLevel false
246-
247- // in milliseconds
248- stanfordMaxTimePerSentence 1000
249-
250- // in tokens
251- stanfordParseMaxSentenceLength 60
252-
253- // directory in which cached annotations will be written.
254- simpleCacheDir simple-annotation-cache
255-
256- // flags indicating which NLP components will be used
257- usePos true
258- useLemma true
259- useShallowParse true
260-
261- // "standard" NER: see http://cogcomp.cs.illinois.edu/page/demo_view/NER
262- useNerConll true
263-
264- // "extended" NER -- see http://cogcomp.cs.illinois.edu/page/demo_view/NERextended
265- useNerOntonotes true
266-
267- useStanfordParse true
268- useStanfordDep true
269-
270- // semantic role labelers
271- useSrlVerb true
272- useSrlNom true
273- ```
233+ The config file is composed with lines of ` [KEY]\t[VAL] ` pairs,
234+ where each pair specifies a property name and its value.
235+ ` [KEY] ` s are property names specified in
236+ [ PipelineConfigurator] ( https://github.com/CogComp/cogcomp-nlp/blob/master/pipeline/src/main/java/edu/illinois/cs/cogcomp/pipeline/common/PipelineConfigurator.java ) .
237+ The mechanism behind is that the config file will be parsed by our
238+ [ ResourceManager] ( https://github.com/CogComp/cogcomp-nlp/blob/master/core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/utilities/configuration/ResourceManager.java ) .
239+ Please see the documentation of
240+ [ core-utilities] ( https://github.com/CogComp/cogcomp-nlp/blob/master/core-utilities/README.md )
241+ to learn more.
242+
243+ You can refer to [ the default config file] ( https://github.com/CogComp/cogcomp-nlp/blob/master/pipeline/config/pipeline-config.properties )
244+ if you need an example. Most property names are self-explanatory, please see specific usages if some are not.
274245
275246Note that individual annotators have their own configuration options -- see the documentation
276247for individual components for details.
0 commit comments