-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pag-Man
committed
Aug 19, 2018
1 parent
4717b76
commit 64c1ff8
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace einfachArchiv\Extractor; | ||
|
||
class CompanyName extends Extraction | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace einfachArchiv\Extractor\CompanyName; | ||
|
||
use einfachArchiv\Extractor\Extraction; | ||
|
||
class De extends Extraction | ||
{ | ||
/** | ||
* Extracts company names from the text. | ||
* | ||
* @return array | ||
*/ | ||
public function handle() | ||
{ | ||
preg_match_all('/\b[A-ZÄÖÜßa-zäöü ]+ (?:GbR\b|OHG\b|GmbH & Co. KG\b|KG\b|Unternehmergesellschaft \(haftungsbeschränkt\)|UG \(haftungsbeschränkt\)|UG\b|GmbH\b|AG\b)/', $this->text, $matches); | ||
|
||
return $matches[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace einfachArchiv\Extractor\CompanyName; | ||
|
||
use einfachArchiv\Extractor\Extraction; | ||
|
||
class En extends Extraction | ||
{ | ||
/** | ||
* Extracts company names from the text. | ||
* | ||
* @return array | ||
*/ | ||
public function handle() | ||
{ | ||
preg_match_all('/\b[A-Za-z ]+ (?:GP\b|LLP\b|LP\b|Corp\.|Inc\.|Ltd\.|LC\b|LLC\b)/', $this->text, $matches); | ||
|
||
return $matches[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters