Added ability to generate 1, 2, 3-gram models on a company/date-range basis using <UNK> to represent the initial appearance of a previously unknown word.
This commit is contained in:
@@ -9,4 +9,5 @@ public interface HeadlineService {
|
||||
int insertHeadline(Headline headline);
|
||||
int[] insertHeadlines(List<Headline> headline);
|
||||
List<Headline> getHeadlines(String stock, Date date);
|
||||
List<Headline> getHeadlines(String stock, Date startDate, Date endDate);
|
||||
}
|
||||
@@ -32,4 +32,9 @@ public class MySQLHeadlineServiceImpl implements HeadlineService {
|
||||
public List<Headline> getHeadlines(String stock, Date date) {
|
||||
return headlineDao.select(stock, date);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Headline> getHeadlines(String stock, Date startDate, Date endDate) {
|
||||
return headlineDao.select(stock, startDate, endDate);
|
||||
}
|
||||
}
|
||||
@@ -86,4 +86,10 @@ public class YahooHeadlineServiceImpl implements HeadlineService {
|
||||
String formattedDate = DATE_FORMATTER.format(date);
|
||||
return QUERY_URL.replaceAll(STOCK_SYMBOL_FIELD, stock).replaceAll(STORY_DATE_FIELD, formattedDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Headline> getHeadlines(String stock, Date startDate,
|
||||
Date endDate) {
|
||||
throw new UnsupportedOperationException("This implementation does not support getting headlines for a date range.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user