Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/cluecode/copyrights.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#

import html
import os
import re
import string
Expand Down Expand Up @@ -423,6 +424,7 @@ def get_tokens(numbered_lines, splitter=re.compile(r'[\t =;]+').split):
if TRACE_TOK:
logger_debug(' get_tokens: before preped line: ' + repr(line))

line = html.unescape(line)
last_line = line

if TRACE_TOK:
Expand Down Expand Up @@ -2216,7 +2218,7 @@ def build_detection_from_node(
(r'^electronics?$', 'NNP'),

# proper nouns with digits
(r'^([A-Z][a-z0-9]+){1,2}[\.,]?$', 'NNP'),
(r'^([A-Z][a-zà-ÿ0-9]+){1,2}[\.,]?$', 'NNP'),

# saxon genitive, ie. Philippe's
(r"^[A-Z][a-z]+'s$", 'NNP'),
Expand Down Expand Up @@ -2256,7 +2258,7 @@ def build_detection_from_node(
# proper noun: first CAP, as in JohnGlen including optional trailing por comma.
# Was before this problematic regex: r'^([A-Z][a-zA-Z0-9]+){,2}\.?,?$':
# this was capturing AbCdEf or a bare comma.
(r'^([A-Z][a-z0-9]+){1,2}\.?,?$', 'NNP'),
(r'^([A-Z][a-zà-ÿ0-9]+){1,2}\.?,?$', 'NNP'),

############################################################################
# URLS and emails
Expand Down
7 changes: 7 additions & 0 deletions tests/cluecode/data/authors/author_html_entity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @author Alexander Dorokhine
* @author Robert Elliot
* @author Ceki Gülcü
*/
public class LoggerFactory {
}
7 changes: 7 additions & 0 deletions tests/cluecode/data/authors/author_html_entity.java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
what:
- authors

authors:
- Alexander Dorokhine
- Robert Elliot
- Ceki Gülcü