/*************************************************************************/
/*                                                                       */
/* Use of the link grammar parsing system is subject to the terms of the */
/* license set forth in the LICENSE file included with this software.    */
/* This license allows free redistribution and use in source and binary  */
/* forms, with or without modification, subject to certain conditions.   */
/*                                                                       */
/*************************************************************************/

package org.linkgrammar;

/**
 * A plain Java bean to hold configuration of the Link Grammar parser.
 * Some configuration parameters are not really passed onto the parser,
 * but applied only when constructing a <code>ParseResult</code>. Those
 * are <code>maxLinkages</code> and <code>allowSkippedWords</code>. 
 *
 * @author Borislav Iordanov
 */
public class LGConfig
{
	private int maxLinkages = 25;
	private int maxParseSeconds = 60;
	private int maxCost = -1;
	private boolean allowSkippedWords = true;
	private String dictionaryLocation = null;
	private boolean storeConstituentString = true;
	
	public int getMaxLinkages()
	{
		return maxLinkages;
	}
	public void setMaxLinkages(int maxLinkages)
	{
		this.maxLinkages = maxLinkages;
	}
	public int getMaxParseSeconds()
	{
		return maxParseSeconds;
	}
	public void setMaxParseSeconds(int maxParseSeconds)
	{
		this.maxParseSeconds = maxParseSeconds;
	}
	public int getMaxCost()
	{
		return maxCost;
	}
	public void setMaxCost(int maxCost)
	{
		this.maxCost = maxCost;
	}
	public boolean isAllowSkippedWords()
	{
		return allowSkippedWords;
	}
	public void setAllowSkippedWords(boolean allowSkippedWords)
	{
		this.allowSkippedWords = allowSkippedWords;
	}
	public String getDictionaryLocation()
	{
		return dictionaryLocation;
	}
	public void setDictionaryLocation(String dictionaryLocation)
	{
		this.dictionaryLocation = dictionaryLocation;
	}
	public boolean isStoreConstituentString()
	{
		return storeConstituentString;
	}
	public void setStoreConstituentString(boolean storeConstituentString)
	{
		this.storeConstituentString = storeConstituentString;
	}	
}

@@ -1230,16 +1230,54 @@
  true;%0D%0A
+%09private boolean storeSense = false;%0D%0A
 %09%0D%0A%09publ
@@ -1365,26 +1365,16 @@
 es(int m
-axLinkages
 )%0D%0A%09%7B%0D%0A%09
@@ -1374,21 +1374,16 @@
 %0D%0A%09%7B%0D%0A%09%09
-this.
 maxLinka
@@ -1389,26 +1389,16 @@
 ages = m
-axLinkages
 ;%0D%0A%09%7D%0D%0A%09
@@ -1502,30 +1502,16 @@
 ds(int m
-axParseSeconds
 )%0D%0A%09%7B%0D%0A%09
@@ -1511,21 +1511,16 @@
 %0D%0A%09%7B%0D%0A%09%09
-this.
 maxParse
@@ -1530,30 +1530,16 @@
 onds = m
-axParseSeconds
 ;%0D%0A%09%7D%0D%0A%09
@@ -1619,22 +1619,16 @@
 st(int m
-axCost
 )%0D%0A%09%7B%0D%0A%09
@@ -1628,21 +1628,16 @@
 %0D%0A%09%7B%0D%0A%09%09
-this.
 maxCost 
@@ -1639,22 +1639,16 @@
 Cost = m
-axCost
 ;%0D%0A%09%7D%0D%0A%09
@@ -1765,32 +1765,16 @@
 oolean a
-llowSkippedWords
 )%0D%0A%09%7B%0D%0A%09
@@ -1774,21 +1774,16 @@
 %0D%0A%09%7B%0D%0A%09%09
-this.
 allowSki
@@ -1795,32 +1795,16 @@
 ords = a
-llowSkippedWords
 ;%0D%0A%09%7D%0D%0A%09
@@ -1923,33 +1923,16 @@
 String d
-ictionaryLocation
 )%0D%0A%09%7B%0D%0A%09
@@ -1932,21 +1932,16 @@
 %0D%0A%09%7B%0D%0A%09%09
-this.
 dictiona
@@ -1954,33 +1954,16 @@
 tion = d
-ictionaryLocation
 ;%0D%0A%09%7D%0D%0A%09
@@ -2086,32 +2086,42 @@
 tString(boolean 
+s)%0D%0A%09%7B%0D%0A%09%09
 storeConstituent
@@ -2130,69 +2130,141 @@
 ring
-)%0D%0A%09%7B%0D%0A%09%09this.storeConstituentString = storeConstituentString
+ = s;%0D%0A%09%7D%09%0D%0A%09public boolean isStoreSense()%0D%0A%09%7B%0D%0A%09%09return storeSense;%0D%0A%09%7D%0D%0A%09public void setStoreSense(boolean s)%0D%0A%09%7B%0D%0A%09%09storeSense = s
 ;%0D%0A%09

Add config setting for word senses.