Project

General

Profile

« Previous | Next » 

Revision 48226

Added by Eri Katsari almost 7 years ago

Changed token blocking to accept year as a token

View differences:

SourceBuildNoCacheMapper.java
76 76
                    }
77 77

  
78 78
                    String property = fields[1];
79
                    String value = fields[2];
80
                    List<String> blockingKeys = Blocking.tokenBlocking(value, stopWordsMap);
81
                    for (String blockingKey : blockingKeys) {
82
                        //Write BlockingKey, RecordID to output
83
                        context.write(new Text(blockingKey), new Text(id + FIELD_DELIM + result.toString()));
84
                        context.getCounter(SOURCE_BUILD_COUNTERS.BLOCKING_KEYS).increment(1);
79
                    if (!property.contains("name") && !property.contains("label")) {
80
                        String value = fields[2];
81
                        List<String> blockingKeys = Blocking.tokenBlocking(value, stopWordsMap);
82
                        for (String blockingKey : blockingKeys) {
83
                            //Write BlockingKey, RecordID to output
84
                            context.write(new Text(blockingKey), new Text(id + FIELD_DELIM + result.toString()));
85
                            context.getCounter(SOURCE_BUILD_COUNTERS.BLOCKING_KEYS).increment(1);
86
                        }
85 87
                    }
86 88
                }
87 89
            }

Also available in: Unified diff