小编Tec*_*ech的帖子

如何从XSLT中的连接变量中清除噪声字符

我有这个XSLT代码片段:

<xsl:variable name="VulnerabilityURI">
    http://web.nvd.nist.gov/view/vuln/detail?vulnId=
</xsl:variable>
<xsl:variable name="WeaknessURI">
    http://cwe.mitre.org/data/de?nitionsn
</xsl:variable>
<xsl:variable name="CVEURI">
    http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=
</xsl:variable>
<xsl:variable name="cweID" select="substring(vuln:cwe/@id,5)" />
<xsl:template match="/*/*">
    <xsl:variable name="cveID" select="vuln:cve-id" />
    <xsl:element name="rdf:Description">
        <xsl:attribute name="rdf:about">
            <xsl:value-of select="concat($VulnerabilityURI, $cveID)" />
        </xsl:attribute>
        <aseg:cveID>
            <xsl:value-of select="concat($CVEURI,$cveID)" />
        </aseg:cveID>
Run Code Online (Sandbox Code Playgroud)

输出如下:

  <?xml version="1.0" encoding="UTF-8"?>
  .....
  .....
  <rdf:Description rdf:about="&#10;&#9;&#9;http://web.nvd.nist.gov/view/vuln/detail    
    vulnId=&#10;&#9;CVE-2010-2227">
  <aseg:cveID>
    http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=
CVE-2010-2227</aseg:cveID> 
Run Code Online (Sandbox Code Playgroud)

正如您在结果的这一部分中所看到的,我想要的连接变量产生了未知字符

  &#10;&#9  
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我解决问题?!!

java xml xslt variables

3
推荐指数
1
解决办法
49
查看次数

Stanford-NER定制,用于对软件编程关键字进行分类

我是NLP的新手,我使用Stanford NER工具对一些随机文本进行分类,以提取软件编程中使用的特殊关键字.

问题是,我不知道如何对Stanford NER中的分类器和文本注释器进行更改以识别软件编程关键字.例如:

today Java used in different operating systems (Windows, Linux, ..)
Run Code Online (Sandbox Code Playgroud)

分类结果应如下:

Java "Programming_Language"
Windows "Operating_System"
Linux "Operating_system"
Run Code Online (Sandbox Code Playgroud)

请问如何定制StanfordNER分类器以满足我的需求?

java nlp classification stanford-nlp

1
推荐指数
1
解决办法
1358
查看次数

标签 统计

java ×2

classification ×1

nlp ×1

stanford-nlp ×1

variables ×1

xml ×1

xslt ×1