<commit_before>var expect = require('chai').expect;
import polyglot from '../src';
describe('Translate title + abstract + other searches (PubMed -> *)', ()=> {

	it('translate `term[tw]` -> PM `term[tw]`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'PubMed abbreviation')).to.equal('term[tw]');
	});

	it('translate `term[tw]` -> OV `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Ovid MEDLINE')).to.equal('term.mp.');
	});

	it('translate `term[tw]` -> CO `term:ti,ab,kw`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Cochrane Library')).to.equal('term:ti,ab,kw');
	});

	it('translate `term[tw]` -> EM `term:ti,ab,de,tn`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Embase (Elsevier)')).to.equal('term:ti,ab,de,tn');
	});

	it('translate `term[tw]` -> CI `term`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'CINAHL (Ebsco)')).to.equal('term');
	});

	it('translate `term[tw]` -> PY `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'PsycInfo (Ovid)')).to.equal('term.mp.');
	});

	it('translate `term[tw]` -> SC `TITLE-ABS-KEY(term)`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Scopus (advanced search)')).to.equal('TITLE-ABS-KEY("term")');
	});

	it('translate `term[tw]` -> WS `term`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Web of Science')).to.equal('term');
	});

});

describe('Translate title + abstract + other searches (Ovid MEDLINE -> *)', ()=> {

	it('translate `term.mp.` -> PM `term[tw]`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'PubMed abbreviation')).to.equal('term[tw]');
	});

	it('translate `term.mp.` -> OV `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Ovid MEDLINE')).to.equal('term.mp.');
	});

	it('translate `term.mp.` -> CO `term:ti,ab,kw`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Cochrane Library')).to.equal('term:ti,ab,kw');
	});

	it('translate `term.mp.` -> EM `term:ti,ab,de,tn`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Embase (Elsevier)')).to.equal('term:ti,ab,de,tn');
	});

	it('translate `term.mp.` -> CI `term`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'CINAHL (Ebsco)')).to.equal('term');
	});

	it('translate `term.mp.` -> PY `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'PsycInfo (Ovid)')).to.equal('term.mp.');
	});

	it('translate `term.mp.` -> SC `TITLE-ABS-KEY(term)`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Scopus (advanced search)')).to.equal('TITLE-ABS-KEY("term")');
	});

	it('translate `term.mp.` -> WS `term`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Web of Science')).to.equal('term');
	});

});

describe('Translate title + abstract + other searches, with automated gunk (Ovid MEDLINE -> *)', ()=> {

	it('translate `term.mp. [...]` -> PM `term[tw]`', ()=> {<commit_msg>fix: Remove quotes from scopus mp<commit_after>var expect = require('chai').expect;
import polyglot from '../src';
describe('Translate title + abstract + other searches (PubMed -> *)', ()=> {

	it('translate `term[tw]` -> PM `term[tw]`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'PubMed abbreviation')).to.equal('term[tw]');
	});

	it('translate `term[tw]` -> OV `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Ovid MEDLINE')).to.equal('term.mp.');
	});

	it('translate `term[tw]` -> CO `term:ti,ab,kw`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Cochrane Library')).to.equal('term:ti,ab,kw');
	});

	it('translate `term[tw]` -> EM `term:ti,ab,de,tn`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Embase (Elsevier)')).to.equal('term:ti,ab,de,tn');
	});

	it('translate `term[tw]` -> CI `term`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'CINAHL (Ebsco)')).to.equal('term');
	});

	it('translate `term[tw]` -> PY `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'PsycInfo (Ovid)')).to.equal('term.mp.');
	});

	it('translate `term[tw]` -> SC `TITLE-ABS-KEY(term)`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Scopus (advanced search)')).to.equal('TITLE-ABS-KEY(term)');
	});

	it('translate `term[tw]` -> WS `term`', ()=> {
		expect(polyglot.translateGeneric('term[tw]', 'Web of Science')).to.equal('term');
	});

});

describe('Translate title + abstract + other searches (Ovid MEDLINE -> *)', ()=> {

	it('translate `term.mp.` -> PM `term[tw]`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'PubMed abbreviation')).to.equal('term[tw]');
	});

	it('translate `term.mp.` -> OV `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Ovid MEDLINE')).to.equal('term.mp.');
	});

	it('translate `term.mp.` -> CO `term:ti,ab,kw`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Cochrane Library')).to.equal('term:ti,ab,kw');
	});

	it('translate `term.mp.` -> EM `term:ti,ab,de,tn`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Embase (Elsevier)')).to.equal('term:ti,ab,de,tn');
	});

	it('translate `term.mp.` -> CI `term`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'CINAHL (Ebsco)')).to.equal('term');
	});

	it('translate `term.mp.` -> PY `term.mp.`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'PsycInfo (Ovid)')).to.equal('term.mp.');
	});

	it('translate `term.mp.` -> SC `TITLE-ABS-KEY(term)`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Scopus (advanced search)')).to.equal('TITLE-ABS-KEY(term)');
	});

	it('translate `term.mp.` -> WS `term`', ()=> {
		expect(polyglot.translateGeneric('term.mp.', 'Web of Science')).to.equal('term');
	});

});

describe('Translate title + abstract + other searches, with automated gunk (Ovid MEDLINE -> *)', ()=> {

	it('translate `term.mp. [...]` -> PM `term[tw]`', ()=> {
{'fraction_non_alphanumeric': 0.27978464744703024, 'fraction_numerical': 0.0, 'mean_word_length': 5.2597826086956525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5495072', 'n_tokens_mistral': 2315, 'n_tokens_neox': 2259, 'n_words': 305}