| 1 |
/*************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* Use of the link grammar parsing system is subject to the terms of the */ |
| 4 |
/* license set forth in the LICENSE file included with this software. */ |
| 5 |
/* This license allows free redistribution and use in source and binary */ |
| 6 |
/* forms, with or without modification, subject to certain conditions. */ |
| 7 |
/* */ |
| 8 |
/*************************************************************************/ |
| 9 |
|
| 10 |
package org.linkgrammar; |
| 11 |
|
| 12 |
/** |
| 13 |
* A plain Java bean to hold configuration of the Link Grammar parser. |
| 14 |
* Some configuration parameters are not really passed onto the parser, |
| 15 |
* but applied only when constructing a <code>ParseResult</code>. This |
| 16 |
* is currently only <code>maxLinkages</code>. |
| 17 |
* |
| 18 |
* @author Borislav Iordanov |
| 19 |
*/ |
| 20 |
public class LGConfig |
| 21 |
{ |
| 22 |
private int maxLinkages = 25; |
| 23 |
private int maxParseSeconds = 60; |
| 24 |
private double maxCost = -1.0; |
| 25 |
private boolean storeConstituentString = false; |
| 26 |
private boolean storeDiagramString = false; |
| 27 |
|
| 28 |
public int getMaxLinkages() |
| 29 |
{ |
| 30 |
return maxLinkages; |
| 31 |
} |
| 32 |
public void setMaxLinkages(int m) |
| 33 |
{ |
| 34 |
maxLinkages = m; |
| 35 |
} |
| 36 |
public int getMaxParseSeconds() |
| 37 |
{ |
| 38 |
return maxParseSeconds; |
| 39 |
} |
| 40 |
public void setMaxParseSeconds(int m) |
| 41 |
{ |
| 42 |
maxParseSeconds = m; |
| 43 |
} |
| 44 |
public double getMaxCost() |
| 45 |
{ |
| 46 |
return maxCost; |
| 47 |
} |
| 48 |
public void setMaxCost(double m) |
| 49 |
{ |
| 50 |
maxCost = m; |
| 51 |
} |
| 52 |
public boolean isStoreConstituentString() |
| 53 |
{ |
| 54 |
return storeConstituentString; |
| 55 |
} |
| 56 |
public void setStoreConstituentString(boolean s) |
| 57 |
{ |
| 58 |
storeConstituentString = s; |
| 59 |
} |
| 60 |
|
| 61 |
public boolean isStoreDiagramString() |
| 62 |
{ |
| 63 |
return storeDiagramString; |
| 64 |
} |
| 65 |
public void setStoreDiagramString(boolean s) |
| 66 |
{ |
| 67 |
storeDiagramString = s; |
| 68 |
} |
| 69 |
} |