<commit_before>var expect = require('chai').expect;
const polyglot = require('../lib').default;

describe('Translate Mesh which appears later in search (Pubmed -> *)', () => {
	it('translate `Language[Majr]` -> OV `exp *Language/`', ()=> {
		expect(polyglot.translate(
			'Title[ti] and Language[Majr]', 'Ovid MEDLINE'
		)).to.equal(
			'Title.ti. AND exp *Language/'
		);
	});
	it('translate `"Practice Guidelines as Topic"[Majr]` -> OV `exp *"Practice Guidelines as Topic"/`', ()=> {
		expect(polyglot.translate(
			'Title[ti] and "Practice Guidelines as Topic"[Majr]', 'Ovid MEDLINE'
		)).to.equal(
			'Title.ti. AND exp *"Practice Guidelines as Topic"/'
		);
	});
})<commit_msg>test: Add sandwiched mesh case<commit_after>var expect = require('chai').expect;
const polyglot = require('../lib').default;

describe('Translate Mesh which appears later in search (Pubmed -> *)', () => {
	it('translate `Language[Majr]` -> OV `exp *Language/`', ()=> {
		expect(polyglot.translate(
			'Title[ti] and Language[Majr]', 'Ovid MEDLINE'
		)).to.equal(
			'Title.ti. AND exp *Language/'
		);
	});
	it('translate `"Practice Guidelines as Topic"[Majr]` -> OV `exp *"Practice Guidelines as Topic"/`', ()=> {
		expect(polyglot.translate(
			'Title[ti] and "Practice Guidelines as Topic"[Majr]', 'Ovid MEDLINE'
		)).to.equal(
			'Title.ti. AND exp *"Practice Guidelines as Topic"/'
		);
	});
	it.only('translate `Sandwiched mesh` -> OV', ()=> {
		expect(polyglot.translate(
			'"Practice Guidelines as Topic"[Majr] OR Guideline[ti] OR "Guideline Adherence"[Majr]', 'Ovid MEDLINE'
		)).to.equal(
			'exp *"Practice Guidelines as Topic"/ OR Guideline.ti. OR exp *"Guideline Adherence"/'
		);
	});
})
{'fraction_non_alphanumeric': 0.19655581947743467, 'fraction_numerical': 0.0, 'mean_word_length': 4.383386581469648, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '1309232', 'n_tokens_mistral': 678, 'n_tokens_neox': 598, 'n_words': 148}