[
https://issues.apache.org/jira/browse/NUTCH-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522254#comment-16522254
]
Sebastian Nagel commented on NUTCH-2611:
----------------------------------------
Could just place a comma-separated list of element names in nutch-default.xml
and retrieve it in setConf() with
[conf.getStrings("parser.html.paragraph.separators")|http://hadoop.apache.org/docs/r2.7.4/api/org/apache/hadoop/conf/Configuration.html#getStrings-java.lang.String-].
Then it would be easy to modify it (same for inline spacing elements). It's
likely that any change to text formatting will break a couple of unit tests,
see NUTCH-2397.
> Add line-breaks when parsing HTML block-level elements
> ------------------------------------------------------
>
> Key: NUTCH-2611
> URL: https://issues.apache.org/jira/browse/NUTCH-2611
> Project: Nutch
> Issue Type: Improvement
> Components: parser
> Affects Versions: 1.14
> Reporter: Yossi Tamari
> Priority: Major
>
> Currently, the HTML and Tika parser only add newlines following text-nodes
> that contain only whitespaces (e.g </span> <span>), but not based on what the
> tags are, so for example a </div><div> will not add a new line.
> While some applications do not differentiate between a space and a new line,
> many others see the semantic difference (two following words in the same
> sentence are "near", but in separate sentences they are not).
> I believe adding newlines after block-level HTML elements, while not a
> panacea, will be an improvement on the current behavior.
> NUTCH-2318 is related to this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)