11#
2- # Copyright (c) 2015 nexB Inc. and others. All rights reserved.
2+ # Copyright (c) 2016 nexB Inc. and others. All rights reserved.
33# http://nexb.com and https://github.com/nexB/scancode-toolkit/
44# The ScanCode software is licensed under the Apache License version 2.0.
55# Data generated with ScanCode require an acknowledgment.
@@ -158,6 +158,8 @@ def detect(location):
158158 (r'^[Gg][Mm][Bb][Hh].?$' , 'COMP' ),
159159 # (italian) company suffix
160160 (r'^[sS]\.[pP]\.[aA]\.?$' , 'COMP' ),
161+ # (dutch and belgian) company suffix
162+ (r'^[Bb]\.?[Vv]\.?|BVBA$' , 'COMP' ),
161163 # university
162164 (r'^[Uu]niv([.]|ersit(y|e|at?|ad?))$' , 'UNI' ),
163165 # institutes
@@ -693,7 +695,7 @@ def detect(self, numbered_lines):
693695 numbers = [n for n , _l in numbered_lines ]
694696 start_line = min (numbers )
695697 end_line = max (numbers )
696- #logger.debug('CopyrightDetector:detect:lines numbers: %(start_line)d->%(end_line)d' % locals())
698+ # logger.debug('CopyrightDetector:detect:lines numbers: %(start_line)d->%(end_line)d' % locals())
697699 tokens = self .get_tokens (numbered_lines )
698700
699701 # we accumulate detected items in these synchronized lists
@@ -712,11 +714,11 @@ def detect(self, numbered_lines):
712714
713715 # first, POS tag each token using token regexes
714716 tagged_text = self .tagger .tag (tokens )
715- #logger.debug('CopyrightDetector:tagged_text: ' + str(tagged_text))
717+ # logger.debug('CopyrightDetector:tagged_text: ' + str(tagged_text))
716718
717719 # then build a parse tree based on tagged tokens
718720 tree = self .chunker .parse (tagged_text )
719- #logger.debug('CopyrightDetector:parse tree: ' + str(tree))
721+ # logger.debug('CopyrightDetector:parse tree: ' + str(tree))
720722
721723 # OPTIMIZED
722724 nltk_tree_Tree = nltk .tree .Tree
@@ -729,7 +731,7 @@ def collect_year_and_holder(detected_copyright):
729731 """
730732 for copyr in detected_copyright :
731733 if isinstance (copyr , nltk_tree_Tree ):
732- #logger.debug('n: ' + str(copyr))
734+ # logger.debug('n: ' + str(copyr))
733735 node_text = CopyrightDetector_as_str (copyr )
734736 copyr_label = copyr .label ()
735737 if 'YR-RANGE' in copyr_label :
@@ -738,7 +740,7 @@ def collect_year_and_holder(detected_copyright):
738740 # FIXME : this would wreck things like 23andme
739741 # where a company name contains numbers
740742 holders_append (refine_author (node_text ))
741- #logger.debug('CopyrightDetector: node_text: ' + node_text)
743+ # logger.debug('CopyrightDetector: node_text: ' + node_text)
742744 collect_year_and_holder (copyr )
743745
744746 # then walk the parse tree, collecting copyrights, years and authors
0 commit comments