


brede_str_wptemplate2struct - Wikipedia template to structure
S = brede_str_wptemplate2struct(s)
Input: s String input with raw Wikipedia article
Property: Info [ {0} | An integer ] Amount of debug
information.
Template [ {[]} | String ] Wikipedia template to
extract. If empty all then all templates in
the article will be extracted. Whether the
initial letter is lower or upper case does
not matter.
Output S Array of structures
Convert a string that represent a raw Wikipedia page with
Wikipedia template instances to a structure.
Nested templates are not all extract - only the deepest level.
Not all template instances may be read correctly.
Example:
s = '{{Town | name=Lyngby | zip=DK-2800 }}';
S = brede_str_wptemplate2struct(s)
s = '{{Cite journal|author=Sue|journal=[[Synapse (journal)|Synapse]]}}'
S = brede_str_wptemplate2struct(s, 'Template', 'cite journal')
% Query Wikipedia for page on Altanserin
s = brede_web_wikipedia('Altanserin');
S = brede_str_wptemplate2struct(s,'template','Cite journal');
B = brede_bib_bib2bib(S);
brede_ui_bibs(B)
See also BREDE, BREDE_STR, BREDE_WEB, BREDE_STR_WPTEMPLATE2CEL,
BREDE_WEB_WIKIPEDIA.
$Id: brede_str_wptemplate2struct.m,v 1.3 2008/07/09 14:24:41 fn Exp $