# Getting original source text in MatchCore

**URL:** <https://community.thinkgeo.com/t/getting-original-source-text-in-matchcore/7220>\
**Category:** Geocoding\
**Created:** [June 28, 2010, 1:23pm UTC](https://community.thinkgeo.com/t/getting-original-source-text-in-matchcore/7220 "2010-06-28T13:23:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [June 28, 2010, 1:23pm UTC](https://community.thinkgeo.com/t/getting-original-source-text-in-matchcore/7220/1 "2010-06-28T13:23:27Z")

</div>

Greetings,

I&nbsp;am&nbsp;looking&nbsp;at&nbsp;extending&nbsp;each&nbsp;of&nbsp;the&nbsp;plugins&nbsp;in&nbsp;order&nbsp;to&nbsp;add&nbsp;my&nbsp;own&nbsp;result&nbsp;ranking&nbsp;scores.&nbsp;&nbsp;My&nbsp;plan&nbsp;is&nbsp;to&nbsp;extend&nbsp;from&nbsp;each&nbsp;plugin&nbsp;(ie&nbsp;StreetMatchingPlugin&nbsp;and&nbsp;override&nbsp;the&nbsp;MatchCore&nbsp;method.&nbsp;&nbsp;In&nbsp;that&nbsp;method,&nbsp;I&nbsp;will&nbsp;call&nbsp;base.MatchCore,&nbsp;which&nbsp;will&nbsp;get&nbsp;me&nbsp;all&nbsp;the&nbsp;results,&nbsp;then&nbsp;I&nbsp;want&nbsp;to&nbsp;iterate&nbsp;through&nbsp;each&nbsp;of&nbsp;those&nbsp;and&nbsp;calculate&nbsp;the&nbsp;score.&nbsp;&nbsp;My&nbsp;problem&nbsp;is&nbsp;the&nbsp;text&nbsp;that&nbsp;comes&nbsp;in&nbsp;to&nbsp;that&nbsp;method&nbsp;as&nbsp;the&nbsp;parameter&nbsp;is&nbsp;only&nbsp;the&nbsp;street&nbsp;name,&nbsp;not&nbsp;the&nbsp;rest&nbsp;of&nbsp;the&nbsp;data.&nbsp;&nbsp;I&nbsp;think&nbsp;I&nbsp;can&nbsp;work&nbsp;around&nbsp;this&nbsp;also&nbsp;overriding&nbsp;the&nbsp;FormalizeCore&nbsp;method,&nbsp;adding&nbsp;my&nbsp;original&nbsp;string&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;string&nbsp;seperated&nbsp;by&nbsp;a&nbsp;character,&nbsp;then&nbsp;parse&nbsp;it&nbsp;out&nbsp;in&nbsp;the&nbsp;MatchCore&nbsp;method,&nbsp;but&nbsp;this&nbsp;seems&nbsp;like&nbsp;a&nbsp;really&nbsp;big&nbsp;hack.&nbsp;&nbsp;Is&nbsp;there&nbsp;any&nbsp;way&nbsp;for&nbsp;me&nbsp;to&nbsp;get&nbsp;my&nbsp;original&nbsp;search&nbsp;text&nbsp;from&nbsp;within&nbsp;the&nbsp;MatchCore&nbsp;method&nbsp;that&nbsp;I&nbsp;am&nbsp;overlooking.

Thanks,

.Ryan.

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [June 28, 2010, 9:20pm UTC](https://community.thinkgeo.com/t/getting-original-source-text-in-matchcore/7220/2 "2010-06-28T21:20:25Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;I&nbsp;think&nbsp;I&nbsp;understand&nbsp;what&nbsp;you&nbsp;want&nbsp;to&nbsp;do.&nbsp;&nbsp;There&nbsp;are&nbsp;a&nbsp;few&nbsp;ways&nbsp;to&nbsp;do&nbsp;this.&nbsp;&nbsp;The&nbsp;intention&nbsp;was&nbsp;for&nbsp;the&nbsp;formalizer&nbsp;to&nbsp;break&nbsp;apart&nbsp;the&nbsp;string&nbsp;so&nbsp;that&nbsp;the&nbsp;plug&nbsp;would&nbsp;not&nbsp;get&nbsp;the&nbsp;whole&nbsp;string.&nbsp;&nbsp;I&nbsp;understand&nbsp;that&nbsp;you&nbsp;want&nbsp;the&nbsp;full&nbsp;string&nbsp;maybe&nbsp;to&nbsp;do&nbsp;some&nbsp;additional&nbsp;analysis,&nbsp;so&nbsp;I&nbsp;can&nbsp;understand&nbsp;that.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;First&nbsp;Way:&nbsp;&nbsp;If&nbsp;you&nbsp;are&nbsp;using&nbsp;the&nbsp;UsaGeocder&nbsp;class&nbsp;then&nbsp;we&nbsp;could&nbsp;send&nbsp;you&nbsp;the&nbsp;code&nbsp;for&nbsp;that.&nbsp;&nbsp;You&nbsp;could,&nbsp;when&nbsp;you&nbsp;inherit&nbsp;from&nbsp;the&nbsp;plugin,&nbsp;create&nbsp;a&nbsp;new&nbsp;property&nbsp;with&nbsp;the&nbsp;entire&nbsp;search&nbsp;string.&nbsp;&nbsp;In&nbsp;the&nbsp;UsaGeocoder&nbsp;before&nbsp;the&nbsp;Match&nbsp;is&nbsp;called&nbsp;you&nbsp;could&nbsp;set&nbsp;the&nbsp;property&nbsp;so&nbsp;that&nbsp;it&nbsp;would&nbsp;be&nbsp;available&nbsp;to&nbsp;you&nbsp;anywhere&nbsp;in&nbsp;the&nbsp;plugin&nbsp;code.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Second&nbsp;Way:&nbsp;You&nbsp;can&nbsp;override&nbsp;the&nbsp;formalizer&nbsp;and&nbsp;set&nbsp;the&nbsp;property&nbsp;there.&nbsp;&nbsp;This&nbsp;still&nbsp;means&nbsp;you&nbsp;need&nbsp;to&nbsp;create&nbsp;a&nbsp;property&nbsp;on&nbsp;the&nbsp;plugin&nbsp;but&nbsp;that&nbsp;should&nbsp;be&nbsp;easy.&nbsp;&nbsp;You&nbsp;can&nbsp;set&nbsp;this&nbsp;in&nbsp;the&nbsp;FormalizeCore.&nbsp;&nbsp;This&nbsp;saves&nbsp;you&nbsp;from&nbsp;having&nbsp;to&nbsp;parse&nbsp;it&nbsp;out&nbsp;and&nbsp;passing&nbsp;it&nbsp;as&nbsp;a&nbsp;search&nbsp;text.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;hope&nbsp;that&nbsp;helps&nbsp;a&nbsp;little.&nbsp;&nbsp;If&nbsp;you&nbsp;still&nbsp;have&nbsp;questions&nbsp;please&nbsp;let&nbsp;us&nbsp;know.&nbsp;&nbsp;The&nbsp;more&nbsp;information&nbsp;you&nbsp;provide&nbsp;the&nbsp;easier&nbsp;it&nbsp;is&nbsp;for&nbsp;us&nbsp;to&nbsp;help&nbsp;quickly.&nbsp;  
&nbsp;&nbsp;  
&nbsp;David
