yoastseo-dep
Version:
Yoast clientside page analysis
44 lines (37 loc) • 1.17 kB
JavaScript
import { languageProcessing } from "yoastseo-dep";
const { AbstractResearcher } = languageProcessing;
// All config
import firstWordExceptions from "./config/firstWordExceptions";
import { all as functionWords } from "./config/functionWords";
import transitionWords from "./config/transitionWords";
import twoPartTransitionWords from "./config/twoPartTransitionWords";
// All helpers
import getStemmer from "./helpers/getStemmer";
import isPassiveSentence from "./helpers/isPassiveSentence";
/**
* The researches contains all the researches
*/
export default class Researcher extends AbstractResearcher {
/**
* Constructor
* @param {Paper} paper The Paper object that is needed within the researches.
* @constructor
*/
constructor( paper ) {
super( paper );
// Delete the researches that are not available for Indonesian.
delete this.defaultResearches.getFleschReadingScore;
Object.assign( this.config, {
language: "id",
passiveConstructionType: "morphological",
firstWordExceptions,
functionWords,
transitionWords,
twoPartTransitionWords,
} );
Object.assign( this.helpers, {
getStemmer,
isPassiveSentence,
} );
}
}