Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| ArticleTopicFeature | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace CirrusSearch\Query; |
| 4 | |
| 5 | /** |
| 6 | * This class has been refactored into ArticlePredictionKeyword. |
| 7 | * |
| 8 | * We preserve it only to avoid breaking extensions that required direct access |
| 9 | * to ArticleTopicFeature::TERMS_TO_LABELS. |
| 10 | */ |
| 11 | class ArticleTopicFeature { |
| 12 | /** |
| 13 | * Maps search terms to tags. |
| 14 | * |
| 15 | * Structure: |
| 16 | * - Keys: search terms |
| 17 | * - Values: tags |
| 18 | * |
| 19 | * @var array<string, string> |
| 20 | */ |
| 21 | public const TERMS_TO_LABELS = [ |
| 22 | 'biography' => 'Culture.Biography.Biography*', |
| 23 | 'women' => 'Culture.Biography.Women', |
| 24 | 'food-and-drink' => 'Culture.Food and drink', |
| 25 | 'internet-culture' => 'Culture.Internet culture', |
| 26 | 'linguistics' => 'Culture.Linguistics', |
| 27 | 'literature' => 'Culture.Literature', |
| 28 | 'books' => 'Culture.Media.Books', |
| 29 | 'entertainment' => 'Culture.Media.Entertainment', |
| 30 | 'films' => 'Culture.Media.Films', |
| 31 | 'media' => 'Culture.Media.Media*', |
| 32 | 'music' => 'Culture.Media.Music', |
| 33 | 'radio' => 'Culture.Media.Radio', |
| 34 | 'software' => 'Culture.Media.Software', |
| 35 | 'television' => 'Culture.Media.Television', |
| 36 | 'video-games' => 'Culture.Media.Video games', |
| 37 | 'performing-arts' => 'Culture.Performing arts', |
| 38 | 'philosophy-and-religion' => 'Culture.Philosophy and religion', |
| 39 | 'sports' => 'Culture.Sports', |
| 40 | 'architecture' => 'Culture.Visual arts.Architecture', |
| 41 | 'comics-and-anime' => 'Culture.Visual arts.Comics and Anime', |
| 42 | 'fashion' => 'Culture.Visual arts.Fashion', |
| 43 | 'visual-arts' => 'Culture.Visual arts.Visual arts*', |
| 44 | 'geographical' => 'Geography.Geographical', |
| 45 | 'africa' => 'Geography.Regions.Africa.Africa*', |
| 46 | 'central-africa' => 'Geography.Regions.Africa.Central Africa', |
| 47 | 'eastern-africa' => 'Geography.Regions.Africa.Eastern Africa', |
| 48 | 'northern-africa' => 'Geography.Regions.Africa.Northern Africa', |
| 49 | 'southern-africa' => 'Geography.Regions.Africa.Southern Africa', |
| 50 | 'western-africa' => 'Geography.Regions.Africa.Western Africa', |
| 51 | 'central-america' => 'Geography.Regions.Americas.Central America', |
| 52 | 'north-america' => 'Geography.Regions.Americas.North America', |
| 53 | 'south-america' => 'Geography.Regions.Americas.South America', |
| 54 | 'asia' => 'Geography.Regions.Asia.Asia*', |
| 55 | 'central-asia' => 'Geography.Regions.Asia.Central Asia', |
| 56 | 'east-asia' => 'Geography.Regions.Asia.East Asia', |
| 57 | 'north-asia' => 'Geography.Regions.Asia.North Asia', |
| 58 | 'south-asia' => 'Geography.Regions.Asia.South Asia', |
| 59 | 'southeast-asia' => 'Geography.Regions.Asia.Southeast Asia', |
| 60 | 'west-asia' => 'Geography.Regions.Asia.West Asia', |
| 61 | 'eastern-europe' => 'Geography.Regions.Europe.Eastern Europe', |
| 62 | 'europe' => 'Geography.Regions.Europe.Europe*', |
| 63 | 'northern-europe' => 'Geography.Regions.Europe.Northern Europe', |
| 64 | 'southern-europe' => 'Geography.Regions.Europe.Southern Europe', |
| 65 | 'western-europe' => 'Geography.Regions.Europe.Western Europe', |
| 66 | 'oceania' => 'Geography.Regions.Oceania', |
| 67 | 'business-and-economics' => 'History and Society.Business and economics', |
| 68 | 'education' => 'History and Society.Education', |
| 69 | 'history' => 'History and Society.History', |
| 70 | 'military-and-warfare' => 'History and Society.Military and warfare', |
| 71 | 'politics-and-government' => 'History and Society.Politics and government', |
| 72 | 'society' => 'History and Society.Society', |
| 73 | 'transportation' => 'History and Society.Transportation', |
| 74 | 'biology' => 'STEM.Biology', |
| 75 | 'chemistry' => 'STEM.Chemistry', |
| 76 | 'computing' => 'STEM.Computing', |
| 77 | 'earth-and-environment' => 'STEM.Earth and environment', |
| 78 | 'engineering' => 'STEM.Engineering', |
| 79 | 'libraries-and-information' => 'STEM.Libraries & Information', |
| 80 | 'mathematics' => 'STEM.Mathematics', |
| 81 | 'medicine-and-health' => 'STEM.Medicine & Health', |
| 82 | 'physics' => 'STEM.Physics', |
| 83 | 'stem' => 'STEM.STEM*', |
| 84 | 'space' => 'STEM.Space', |
| 85 | 'technology' => 'STEM.Technology', |
| 86 | ]; |
| 87 | } |