MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=wikispeech-segment
- This module requires read rights.
- Source: Wikispeech
- License: GPL-2.0-or-later
Split a page's HTML content into segments.
- page
The title of the page to segment.
- This parameter is required.
HTML tags that should be removed completely during cleaning, as a JSON object of the format:
{ "tag1": true, "tag2": "css-class", "tag3": ["css-class-1", "css-class-2"] }where
tag1is always removed,tag2is only removed if it also has the CSS classcss-classandtag3is only removed if it also has the CSS classcss-class-1orcss-class-2. Be aware that wikispeech-listen uses default configuration for segmenting and might not be compatible with segments produced with an ad hoc setting of this parameter.- Default: {"span":["mw-editsection","printonly","mwe-math-element"],"table":true,"sup":"reference","div":["thumb","toc","noprint"],"figure":true,"figcaption":true}
HTML tags that should breaks segments. Be aware that wikispeech-listen uses default configuration for segmenting and might not be compatible with segments produced with an ad hoc setting of this parameter.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- Default: h1|h2|h3|h4|h5|h6|p|br|li
- part-of-content
Add extra content for certain elements.
- Type: boolean (details)
- consumer-url
URL to the consumer wiki's script path.
- Segment the main page using default parameters from the config.
- api.php?action=wikispeech-segment&format=json&page=Main_Page [open in sandbox]
- Segment using custom parameters. The tag
supis removed and so isdivwhen it has the classtoc. The tagsh1andh2break segments. - api.php?action=wikispeech-segment&format=json&page=Main_Page&removetags={"sup": true, "div": "toc"}&segmentbreakingtags=h1|h2 [open in sandbox]
- Segment the main page on another wiki.
- api.php?action=wikispeech-segment&format=json&page=Main_Page&consumer-url=https://consumer.url/w [open in sandbox]