de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikipedia.text
Class TemplateParser

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikipedia.text.TemplateParser

public class TemplateParser
extends Object

Set of functions related to wiki {{templates|..}}.


Constructor Summary
TemplateParser()
           
 
Method Summary
static String expandTemplateParams(String source_text, String template_name, String target, String replacement)
          Expands template parameters, replaces all substrings "target" by "replacement" in the part of "source_text" which contains template titled "template_name"; removes template name and brackets, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateParser

public TemplateParser()
Method Detail

expandTemplateParams

public static String expandTemplateParams(String source_text,
                                          String template_name,
                                          String target,
                                          String replacement)
Expands template parameters, replaces all substrings "target" by "replacement" in the part of "source_text" which contains template titled "template_name"; removes template name and brackets, e.g. "abc{{template|start..target..end}}xyz" -> "abcstart..replacement..endxyz"

Parameters:
text - source text with quotation template
Returns:
text with replaced text


Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.