// Path: src/main/java/unsw/curation/api/domain/ExtractionKeyword.java
// public class ExtractionKeyword {
// 
// 	public ExtractionKeyword(){}
// 	public ExtractionKeyword(String tweet,String keyword)
// 	{
// 		this.tweet=tweet;
// 		this.keyword=keyword;
// 	}
// 	public ExtractionKeyword(String keyword)
// 	{
// 		this.keyword=keyword;
// 	}
// 	public String tweet;
// 	public String keyword;
// 	public String inputSentence;
// 	public String inputTweet;
// 
// 	
// 	public void setInputSentence(String inputSentence)
// 	{
// 		this.inputSentence=inputSentence;
// 	}
// 	
// 	public String getInputSentence()
// 	{
// 		return inputSentence;
// 	}
// 	public void setInputTweet(String inputTweet)
// 	{
// 	  this.inputTweet=inputTweet;
// 	}
// 	public String getInputTweet()
// 	{
// 		return inputTweet;
// 	}
// 	public void setTweet(String tweet)
// 	{
// 		this.tweet=tweet;
// 	}
// 	public String getTweet()
// 	{
// 		return tweet;
// 	}
// 	
// 	public void setKeyword(String keyword)
// 	{
// 		this.keyword=keyword;
// 	}
// 	public String getKeyword()
// 	{
// 		return keyword;
// 	}
// 	
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/IKeywordEx.java
// public interface IKeywordEx {
// 
// 	String ExtractTweetKeyword(String inputTweet,File stopWordList) throws Exception;
// 	List<ExtractionKeyword> ExtractTweetKeywordFromFile(File fileName, File stopWordList) throws FileNotFoundException, IOException;
// 	String ExtractSentenceKeyword(String inputSentence, File stopWordList) throws Exception;
// 	//String ExtractSentenceKeyPhrase(String inputSentence,File stopWordList) throws Exception;
// 	String ExtractFileKeyword(File fileName, File stopWordList) throws FileNotFoundException, IOException;
// 	/*ExtractionKeyword ExtractSentenceKeywords(String inputSentence) throws Exception;
// 	ExtractionKeyword ExtractFileKeywords(String inputFilePath) throws Exception;*/
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.analysis.util.CharArraySet;
import edu.stanford.nlp.patterns.surface.CreatePatterns.CreatePatternsThread;
import opennlp.tools.sentdetect.SentenceDetector;
import opennlp.tools.sentdetect.SentenceDetectorME;
import opennlp.tools.sentdetect.SentenceModel;
import unsw.curation.api.domain.ExtractionKeyword;
import unsw.curation.api.domain.abstraction.IKeywordEx;

        }
            return Line;
    }
	 String Patternn="(http:|https:|ftp)[:-_?\\a-zA-Z\\d.*//]+";
	 private List<String> lstStopWords=new ArrayList<>();
	 
	@Override
	public String ExtractTweetKeyword(String inputTweet, File stopwordList) throws Exception 
	{
		lstStopWords=ReadRawData(stopwordList);
		String trimmedText=inputTweet.replaceAll(Patternn, "");
        trimmedText=trimmedText.replaceAll("\\d", "");
        String values=preProcessTweet(trimmedText);
        CharArraySet stopWords=new CharArraySet(org.apache.lucene.util.Version.LUCENE_46,lstStopWords,true);
        TokenStream tokenStreamer = new 
    		StandardTokenizer(org.apache.lucene.util.Version.LUCENE_46, new StringReader(values));
        tokenStreamer = new StopFilter(org.apache.lucene.util.Version.LUCENE_46, tokenStreamer, stopWords);
        StringBuilder sb = new StringBuilder();
        CharTermAttribute charTermAttribute = tokenStreamer.addAttribute(CharTermAttribute.class);
        tokenStreamer.reset();
        while (tokenStreamer.incrementToken()) 
        {
           String term = charTermAttribute.toString();
           sb.append(term).append(",");
        }
       
        return sb.toString();
	}

	@Override

// Path: src/main/java/unsw/curation/api/domain/ExtractionKeyword.java
// public class ExtractionKeyword {
// 
// 	public ExtractionKeyword(){}
// 	public ExtractionKeyword(String tweet,String keyword)
// 	{
// 		this.tweet=tweet;
// 		this.keyword=keyword;
// 	}
// 	public ExtractionKeyword(String keyword)
// 	{
// 		this.keyword=keyword;
// 	}
// 	public String tweet;
// 	public String keyword;
// 	public String inputSentence;
// 	public String inputTweet;
// 
// 	
// 	public void setInputSentence(String inputSentence)
// 	{
// 		this.inputSentence=inputSentence;
// 	}
// 	
// 	public String getInputSentence()
// 	{
// 		return inputSentence;
// 	}
// 	public void setInputTweet(String inputTweet)
// 	{
// 	  this.inputTweet=inputTweet;
// 	}
// 	public String getInputTweet()
// 	{
// 		return inputTweet;
// 	}
// 	public void setTweet(String tweet)
// 	{
// 		this.tweet=tweet;
// 	}
// 	public String getTweet()
// 	{
// 		return tweet;
// 	}
// 	
// 	public void setKeyword(String keyword)
// 	{
// 		this.keyword=keyword;
// 	}
// 	public String getKeyword()
// 	{
// 		return keyword;
// 	}
// 	
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/IKeywordEx.java
// public interface IKeywordEx {
// 
// 	String ExtractTweetKeyword(String inputTweet,File stopWordList) throws Exception;
// 	List<ExtractionKeyword> ExtractTweetKeywordFromFile(File fileName, File stopWordList) throws FileNotFoundException, IOException;
// 	String ExtractSentenceKeyword(String inputSentence, File stopWordList) throws Exception;
// 	//String ExtractSentenceKeyPhrase(String inputSentence,File stopWordList) throws Exception;
// 	String ExtractFileKeyword(File fileName, File stopWordList) throws FileNotFoundException, IOException;
// 	/*ExtractionKeyword ExtractSentenceKeywords(String inputSentence) throws Exception;
// 	ExtractionKeyword ExtractFileKeywords(String inputFilePath) throws Exception;*/
// }


// Path: src/main/java/unsw/curation/api/tokenization/ExtractionKeywordImpl.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.analysis.util.CharArraySet;
import edu.stanford.nlp.patterns.surface.CreatePatterns.CreatePatternsThread;
import opennlp.tools.sentdetect.SentenceDetector;
import opennlp.tools.sentdetect.SentenceDetectorME;
import opennlp.tools.sentdetect.SentenceModel;
import unsw.curation.api.domain.ExtractionKeyword;
import unsw.curation.api.domain.abstraction.IKeywordEx;

        }
            return Line;
    }
	 String Patternn="(http:|https:|ftp)[:-_?\\a-zA-Z\\d.*//]+";
	 private List<String> lstStopWords=new ArrayList<>();
	 
	@Override
	public String ExtractTweetKeyword(String inputTweet, File stopwordList) throws Exception 
	{
		lstStopWords=ReadRawData(stopwordList);
		String trimmedText=inputTweet.replaceAll(Patternn, "");
        trimmedText=trimmedText.replaceAll("\\d", "");
        String values=preProcessTweet(trimmedText);
        CharArraySet stopWords=new CharArraySet(org.apache.lucene.util.Version.LUCENE_46,lstStopWords,true);
        TokenStream tokenStreamer = new 
    		StandardTokenizer(org.apache.lucene.util.Version.LUCENE_46, new StringReader(values));
        tokenStreamer = new StopFilter(org.apache.lucene.util.Version.LUCENE_46, tokenStreamer, stopWords);
        StringBuilder sb = new StringBuilder();
        CharTermAttribute charTermAttribute = tokenStreamer.addAttribute(CharTermAttribute.class);
        tokenStreamer.reset();
        while (tokenStreamer.incrementToken()) 
        {
           String term = charTermAttribute.toString();
           sb.append(term).append(",");
        }
       
        return sb.toString();
	}

	@Override

	public List<ExtractionKeyword> ExtractTweetKeywordFromFile(File fileName, File stopwordList) throws FileNotFoundException, IOException 
