import { expect } from 'chai' import * as fs from 'fs' import 'mocha' import path from 'path' import { htmlToSpeechFile, htmlToSsmlItems, stripEmojis, } from '../src/htmlToSsml' const TEST_OPTIONS = { primaryVoice: 'test-primary', secondaryVoice: 'test-secondary', language: 'en-US', rate: '1.0', } const load = (filename: string) => { return fs.readFileSync(path.join(__dirname, filename), 'utf8') } describe('stripEmojis', () => { it('strips emojis from text and removes the extra space', () => { const text = '🥛The Big Short guy is back with a new prediction' expect(stripEmojis(text)).to.equal( 'The Big Short guy is back with a new prediction' ) }) it('strips emojis from html and removes the extra space', () => { const text = `
this is some text
this is in the first paragraph this is in the second span this is also in the first paragraph
this is in the first paragraph this is in the second span this is also in the first paragraph
this is in the second paragraph
this is also in the first paragraphthis is in the first paragraph this is in the second paragraph this is also in the first paragraph
this is in the first paragraph
this is in the first paragraph
this is in the first paragraph
this is a blockquotethis is also in the first paragraph
first
second
third
Q: „Die kürzliche Razzia in den BBC-Büros in Delhi sind ein weiterer Versuch der Regierung, kritische Medien-Kommentare zu unterdrücken. Man hat des Gefühl, Herr Modi hat Angst, in den Spiegel zu schauen!?“
这是一段中文,我想看看它是怎么分句的。如果买二手房有中介参与,要找相对大的、知名的中介。中介的收费、服务情况要先问清。还要和中介谈好,中介费的付款时间,一般来说是签完合同付一部分,过户后付一部分,省的太早付完钱,中介就不管事了。付完记得要发票。中介如果提供贷款服务,让他玩去。贷款之类的问题,别怕麻烦,自己去找银行。