程序代写 package ngordnet.ngrams;

package ngordnet.ngrams;

import java.util.Collection;

Copyright By PowCoder代写 加微信 powcoder

/** An object that provides utility methods for making queries on the
* Google NGrams dataset (or a subset thereof).
* An NGramMap stores pertinent data from a “words file” and a “counts
* file”. It is not a map in the strict sense, but it does provide additional
* functionality.
* @author
public class NGramMap {
/** Constructs an NGramMap from WORDSFILENAME and COUNTSFILENAME. */
public NGramMap(String wordsFilename, String countsFilename) {

/** Provides the history of WORD. The returned TimeSeries should be a copy,
* not a link to this NGramMap’s TimeSeries. In other words, changes made
* to the object returned by this function should not also affect the
* NGramMap. This is also known as a “defensive copy”. */
public TimeSeries countHistory(String word) {
return null;

/** Provides the history of WORD between STARTYEAR and ENDYEAR, inclusive of both ends. The
* returned TimeSeries should be a copy, not a link to this NGramMap’s TimeSeries. In other words,
* changes made to the object returned by this function should not also affect the
* NGramMap. This is also known as a “defensive copy”. */
public TimeSeries countHistory(String word, int startYear, int endYear) {
return null;

/** Returns a defensive copy of the total number of words recorded per year in all volumes. */
public TimeSeries totalCountHistory() {
return null;

/** Provides a TimeSeries containing the relative frequency per year of WORD compared to
* all words recorded in that year. */
public TimeSeries weightHistory(String word) {
return null;

/** Provides a TimeSeries containing the relative frequency per year of WORD between STARTYEAR
* and ENDYEAR, inclusive of both ends. */
public TimeSeries weightHistory(String word, int startYear, int endYear) {
return null;

/** Returns the summed relative frequency per year of all words in WORDS. */
public TimeSeries summedWeightHistory(Collection words) {
return null;

/** Provides the summed relative frequency per year of all words in WORDS
* between STARTYEAR and ENDYEAR, inclusive of both ends. If a word does not exist in
* this time frame, ignore it rather than throwing an exception. */
public TimeSeries summedWeightHistory(Collection words,
int startYear, int endYear) {
return null;

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com