Skip to content

Commit

Permalink
Add Measurement expansion in Swedish (#211)
Browse files Browse the repository at this point in the history
Improved Measurement detection.
Measurement attributes get a span (where
applicable).
  • Loading branch information
ISC-SDE committed Aug 22, 2022
1 parent 3c0d32c commit fa5ca83
Show file tree
Hide file tree
Showing 34 changed files with 53,968 additions and 42,204 deletions.
113 changes: 60 additions & 53 deletions language_models/sv/labels.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,76 @@
;1,$;PrimaryRelation;typeAttribute;;0;;

/* SV Equivalents of mandatory labels
;25,30,40,60,65,70,75,76,80,$;SVPunctuation;typeEndConcept;copy of mandatory label;0;;
;25,30,35,40,60,65,70,75,76,77,80,$;SVPunctuation;typeEndConcept;copy of mandatory label;0;;

/* SV Equivalents of mandatory attributes
;1,15,40,45,$;SVCapitalAll;typeAttribute;copy of mandatory label;0;;
;1,15,40,45,$;SVCapitalInitial;typeAttribute;copy of mandatory label;0;;
;1,15,40,$;SVCapitalMixed;typeAttribute;copy of mandatory label;0;;
;1,15,40,45;SVCapitalAll;typeAttribute;copy of mandatory label;0;;
;1,15,40,45,77;SVCapitalInitial;typeAttribute;copy of mandatory label;0;;
;1,15,40;SVCapitalMixed;typeAttribute;copy of mandatory label;0;;

/* Default label
;1,15,25,30,35,40,45,50,60,65,70,75,76,80,$;SVCon;typeConcept;default label;1;;
;1,15,25,30,35,40,45,50,60,65,70,75,76,77,80,$;SVCon;typeConcept;default label;1;;

/* Structural labels
;40,$;-;typeOther;symbol for composite labels;0;;

/* Other labels
;1,15,25,30,40,45,50,60,65,69,70,75,76,80,$;SVAdj;typeConcept;adjective;0;;
;1,15,40,60,65,70,75,76,$;SVAdjCon;typeConcept;adjective or noun;0;;
;1,15,30,45,60,65,70,75,76,80,$;SVAdjpron;typeConcept;attributive pronoun used as an adjective;0;;
;1,15,25,30,40,45,50,60,65,69,70,75,76,77,80,$;SVAdj;typeConcept;adjective;0;;
;1,15,40,60,65,70,75,76,77,$;SVAdjCon;typeConcept;adjective or noun;0;;
;1,15,30,45,60,65,70,75,76,77,80,$;SVAdjpron;typeConcept;attributive pronoun used as an adjective;0;;

;1,15,25,30,40,45,50,65,75,76,$;SVAdv;typeRelation;adverb;0;;
;1,15,30,40;SVAdvAdj;typeAmbiguous;adjective or adverb;0;;
;1,15,40;SVAdvAdjCon;typeAmbiguous;adverb, adjective or noun;0;;
;1,15,40;SVAdvCon;typeAmbiguous;adverb or noun;0;;
;1,15,40,50,65,75,76,$;SVAdvC;typeBeginEndConcept;concept adverb;0;;
;1,15,40,65,75,76,$;SVAdvAmount;typeOther;adverb indicating an amount;0;;
;1,15,40,65,75,76;SVAdvAmount;typeOther;adverb indicating an amount;0;;
;1,15,25,40,45,50,60,65,70;SVAdvDegree;typeOther;adverb of degree;0;;
;1,15,40,65,75,76,$;SVAdvDirection;typeRelation;adverb of direction;0;;
;1,15,30,40,50,65,75,76,$;SVAdvFreq;typePathRelevant;adverb of frequency;0;;
;1,15,30,40,50,65,75,76,77,$;SVAdvFreq;typePathRelevant;adverb of frequency;0;;
;1,15,40;SVAdvManner;typeOther;adverb of manner;0;;
;1,15,40,45,60,65,70,75,76,$;SVAdvModal;typeRelation;modal adverb;0;;
;1,15,40,50,65,75,76,$;SVAdvPlace;typePathRelevant;adverb of place;0;;
;1,15,85,$;SVAdvPR;typePathRelevant;nonrelevant adverb that becomes PR in certain contexts;0;;
;1,15,40,60,65,70;SVAdvRestrict;typeOther;restricting adverb: bara, endast, enbart;0;;
;1,15,40,60,65,70,77;SVAdvRestrict;typeOther;restricting adverb: bara, endast, enbart;0;;
;1,15,40,60,65,70,75,76,80,$;SVAdvStruct;typeOther;adverb of structure;0;;
;1,15,30,40,50,65,70,75,76,$;SVAdvTemp;typePathRelevant;time-related adverbs but no real time indications, e.g. suddenly, immediately;0;;
;1,15,25,30,40,50,65,70,75,76,$;SVAdvTime;typeBeginEndConcept;adverb of time;0;;
;1,15,30;SVAdvTimeFreq;typeBeginEndConcept;adverb expressing concrete frequency;0;;

;1,30,35;SVAgeprep;typeRelation;preposition used before age;0;;
;1,30,35,77;SVAgeprep;typeRelation;preposition used before age;0;;
;1,15,40;SVAnnan;typeAmbiguous;annan, annat, helt annat;0;;
;1,60,65,70,75;SVAndOr;typeRelation;eller, och, eller/och, och/eller;0;;
;1,15,30,40,60,65,70,75,76,80,85,$;SVAndOrBut;typeRelation;coordinate conjunction;0;;
;1,35,60,65,70,75,77;SVAndOr;typeRelation;eller, och, eller/och, och/eller;0;;
;1,15,30,40,60,65,70,75,76,77,80,85,$;SVAndOrBut;typeRelation;coordinate conjunction;0;;
;1,15,25,40,45,60,65,70,75,76,80,85,$;SVAtt;typeRelation;the word att;0;;
;1,15,25,30,40,45,60,65,70,75,76,80,$;SVAttrpron;typeOther;attributively used pronouns;0;;
;1,15,25,30,40,45,60,65,70,75,76,77,80,$;SVAttrpron;typeOther;attributively used pronouns;0;;
;1,15,40;SVAttrRelpron;typeAmbiguous;vilka, vilken, vilket;0;;
;1,15,25,40,65;SVAux;typeRelation;auxiliary verb;0;;
;1,15,30,40;SVAv;typeRelation;av;0;;
;1,15,30,40,45,65,70,75,76,80,$;SVbCon;typeBeginConcept;first word of a Concept;0;;
;1,15,30,40,45,65,70,75,76,77,80,$;SVbCon;typeBeginConcept;first word of a Concept;0;;
;1,65,70,75,76,80,85,$;SVbRel;typeBeginRelation;first word of a Relation;0;;
;1,30;SVClocktime;typeConcept;hh.mm;0;;
;1,30,35;SVClocktime2;typeConcept;hh:mm -> can be time or price;0;;
;1,35;SVColonnumber;typeConcept;d(d+):d+, not in clock time range;0;;
;30,35,40,60,65,70,75,76,$;SVComma;typeOther;comma;0;;
;1,35;SVCompareprep;typeRelation;preposition used in comparisons;0;;
;1,15,40,75,76,$;SVConIfCap;typeConcept;capitalized noun or name;0;;
;1,15,40,75,76,$;SVConIfAllCap;typeConcept;acronym in upper case;0;;
;30,35,40,60,65,70,75,76,77,$;SVComma;typeOther;comma;0;;
;1,35,77;SVCompareprep;typeRelation;preposition used in comparisons;0;;
;1,15,40;SVConIfCap;typeConcept;capitalized noun or name;0;;
;1,15,40;SVConIfAllCap;typeConcept;acronym in upper case;0;;
;1,15,40,45;SVConpart1;typeConcept;first part of a concept;0;;
;1,15,25,40,60,65,70,75,76,80,85,$;SVConj;typeRelation;conjunction;0;;
;1,15,25,40,60,65,70,75,76,77,80,85,$;SVConj;typeRelation;conjunction;0;;
;1,35;SVCurrency;typeConcept;currency name;0;;
;1,45,60,65,70;SVCPron;typeConcept;extra label for Concept-pronouns;0;;
;1,15,30,45,50,75,76,$;SVDay;typeConcept;name of day;0;;
;1,30,40,75,76;SVDecinum;typeConcept;extra label for decimal numbers;0;;
;1,15,25,30,40,45,60,65,70,75,76,$;SVDefart;typeOther;definite article;0;;
;1,15,25,30,40,45,60,65,70,75,76,77,$;SVDefart;typeOther;definite article;0;;
;1,15,30,40,65,75,76,$;SVDemonstr;typeOther;demonstrative pronoun;0;;
;1,15,40,65,75,76,$;SVeCon;typeEndConcept;last word of a Concept;0;;
;1,15,40,65,75,76,77,$;SVeCon;typeEndConcept;last word of a Concept;0;;
;1,15,40,60;SVExample;typeAmbiguous;for example, amongst other, more specifically,..., R or NR;0;;
;1,15,40;SVFast;typeAmbiguous;fast: verb particle or adjective;0;;
;1,15,40;SVFoerstaas;typeRelation;förstås: modal adverb, inf or verb;0;;
;1,15,30,40,45,65,75,76,$;SVGen;typeConcept;genitive form of noun;0;;
;1,15,30,40,45,65,75,76,77,$;SVGen;typeConcept;genitive form of noun;0;;
;1,15,40;SVIgnoreCap;typeOther;label to avoid that relation words get concepts when written with a capital;0;;
;1,15,25,30,35,40,60,65,70,75,76,$;SVIndefart;typeOther;indefinite article;0;;
;1,15,25,30,35,40,60,65,70,75,76,77,$;SVIndefart;typeOther;indefinite article;0;;
;1,15,40;SVImpCon;typeAmbiguous;imperative or noun;0;;

;1,30;SVHour;typeConcept;number that can indicate time;0;;
Expand All @@ -99,31 +99,32 @@
;1,69,75,76;SVNonRelevant;typeOther;copy of NonRelevant;0;;
;1,30,35;SV12dNum;typeConcept;1 or 2 digits, can be first part of larger number;0;;
;1,30;SV3dNum;typeConcept;3 digits, can be part of larger number;0;;
;1,25,30,35,40,45,65,70,75,76,80,$;SVNum;typeConcept;number written in digits;0;;
;1,15,25,30,35,40,45,65,75,76,$;SVNumber;typeConcept;number;0;;
;1,35,$;SVNumberPlusUnit;typeConcept;general label for all numbers plus units without space;0;;Entity(Measurement,Value,Unit)
;1,25,30,35,40,45,65,70,75,76,77,80,$;SVNum;typeConcept;number written in digits;0;;
;1,15,25,30,35,40,45,65,75,76,77,$;SVNumber;typeConcept;number;0;;
;1,35,77,$;SVNumberPlusUnit;typeConcept;general label for all numbers plus units without space;0;;Entity(Measurement,Value,Unit)
;1,30,35;SVNumpart2;typeConcept;plural numbers like 'miljoner';0;;
;1,30;SVNumX;typeConcept;digit with x in one, e.g. 2x;0;;
;1,15,40,45,60,65,70,75,76,80,$;SVObjpron;typePathRelevant;object form of personal pronoun;0;;
;1,15,30,40,45,75,76,$;SVOrdnumber;typeConcept;ordinal number;0;;
;1,15,40,45,60,65,70,75,76,77,80,$;SVObjpron;typePathRelevant;object form of personal pronoun;0;;
;1,15,30,40,45,75,76,77,$;SVOrdnumber;typeConcept;ordinal number;0;;
;1,30,35,40;SVQuantity;typeConcept;några, flera,...;0;;

;1,15,40;SVPart;typeAmbiguous;past participle;0;;
;1,15,40;SVPartCon;typeAmbiguous;past participle or noun;0;;
;1,15,40;SVPartSup;typeAmbiguous;past participle or supinum;0;;
;1,15,40;SVPartSupCon;typeAmbiguous;past participle, supinum or noun;0;;

;1,15,25,30,35,40,45,65,80;SVpAux;typeRelation;passive auxiliary;0;;
;1,15,25,30,35,40,45,65,77,80;SVpAux;typeRelation;passive auxiliary;0;;
;1,15,40,45;SVPluralnoun;typeConcept;plural noun;0;;
;1,15,40,75,76,$;SVPlussign;typeConcept;plus sign (cannot be used as literal);0;;
;1,15,25,40,60,65,70,75,76,$;SVPosspron;typePathRelevant;possessive pronoun;0;;
;1,15,25,40,60,65,70,75,76,77,$;SVPosspron;typePathRelevant;possessive pronoun;0;;
;1,15,40;SVPossCon;typeAmbiguous;possessive pronoun or noun;0;;
;1,15,40;SVPossibleGennoun;typeConcept;unknown word ending in -s;0;;
;1,15,40,77;SVPossibleGennoun;typeConcept;unknown word ending in -s;0;;
;1,15,40;SVPreferRelation;typeAmbiguous;extra label for ambiguous words that are more often relations than concepts;0;;

;1,15,25,30,35,40,45,60,65,70,75,76,80,85,$;SVPrep;typeRelation;preposition;0;;
;1,15,25,30,35,40,45,60,65,70,75,76,77,80,85,$;SVPrep;typeRelation;preposition;0;;
;1,15,40;SVPrepAdv;typeAmbiguous;preposition or adverb;0;;
;1,15,40;SVPrepCon;typeAmbiguous;preposition or noun;0;;
;1,77;SVMeasspanprep;typeRelation;preposition to include in a measurement span;0;;
;1,30,75,76;SVTimeprep;typeRelation;preposition that occurs in time expressions, extra label next to SVPrep;0;;
;75;SVTimespanprep;typeRelation;efter, före, sedan, under;0;;

Expand All @@ -145,11 +146,11 @@
;1,15,40;SVSupCon;typeAmbiguous;supinum or noun;0;;

;1,30;SVTimeadj;typeConcept;potential part of time indication, next to other label;0;;
;1,15,25,30,35,45,75,76;SVTimeconcept;typeBeginEndConcept;time indication;0;;
;1,15,25,30,35,45,75,76,77;SVTimeconcept;typeBeginEndConcept;time indication;0;;
;1,30;SVTimespan;typeConcept;words indication a part: halvan, resten,...;0;;
;1,15,30,35;SVUnit;typeConcept;unit for measurements;0;;
;1,15,30,35,77;SVUnit;typeConcept;unit for measurements;0;;
;1,65,70,75,76,80,85,$;SVUtan;typeRelation;utan;0;;
;1,15,40;SVVara;typeAmbiguous;vara: passive aux. or main verb as verb or infinitive, noun;0;;
;1,15,30,40;SVVara;typeAmbiguous;vara: passive aux. or main verb as verb or infinitive, noun;0;;

;1,15,25,40,65;SVVerb;typeRelation;conjugated verb;0;;
;1,15,40;SVVerbAdj;typeAmbiguous;conjugated verb or adjective;0;;
Expand All @@ -164,23 +165,23 @@
;1,15,40;SVVerbPartSup;typeAmbiguous;past participle, supinum or other conjugated verb form;0;;

;1,15,40,65,70,75,76,$;SVVerbpt2;typeRelation;particle that belongs to a verb;0;;
;1,15,40,45,60,65,70,75,76,80,85,$;SVvRel;typeRelation;verbal relation, only used in rules;0;;
;1,15,40,45,60,65,70,75,76,77,80,85,$;SVvRel;typeRelation;verbal relation, only used in rules;0;;
;70;SVVidare;typeAmbiguous;the word 'vidare', Literal label is not possible because of lexrep '( se vidare';0;;
;1,30;SVWeeknum;typeConcept;number than can be a week number -> 1-53;0;;
;1,25,30,40,45,50,60,75,76,80,$;SVYear;typeConcept;year number;0;;
;1,25,30,40,45,50,60,75,76,77,80,$;SVYear;typeConcept;year number;0;;
;1,30,75;SVYearpart;typeConcept;seasons etc.;0;;

/* SV attributes
;1,70;SVCondition;typeAttribute;om and även om;0;;
;1,30;SVDefnoun;typeAttribute;definite form of noun;0;;
;40,70,80;SVDummy;typeAttribute;meaningless attribute, usable in rules when ^LabelA in the left part has to remain untouched;0;;
;40,70,77,80;SVDummy;typeAttribute;meaningless attribute, usable in rules when ^LabelA in the left part has to remain untouched;0;;
;40,$;SVEttform;typeAttribute;to mark pronouns that can be used attributively with an AdvAdj;0;;
;40,$;SVSForm;typeAttribute;to mark s-forms;0;;
;15,35,40,$;SVRegex;typeAttribute;to mark lexreps that are labeled via regular expressions;0;;
;60,65,70,80;SVList;typeAttribute;mark enumerations;0;;
;60,65,70,77,80;SVList;typeAttribute;mark enumerations;0;;
;60;SVListEnd;typeAttribute;och så vidare, etc.;0;;

;70,75,$;SVNegation;typeAttribute;to mark certain entities as negation;0;;Entity(Negation)
;70,75,77,$;SVNegation;typeAttribute;to mark certain entities as negation;0;;Entity(Negation)
;70,$;SVNegBegin;typeAttribute;to begin the negation path, movable;0;;Path(Begin,Negation)
;70,$;SVNegStart;typeAttribute;first element of negation path, not movable;0;;Path(Begin,Negation)
;70,$;SVNegStop;typeAttribute;to end the negation path;0;;Path(End,Negation)
Expand All @@ -197,24 +198,30 @@
;30,45,$;SVDate;typeAttribute;used within the rules file to mark detected dates;0;;
;30,75;SVTimemodifier;typeAttribute;ungefär, exakt, etc.;0;;
;30;SVPosttime;typeAttribute;senare, e.Kr., postoperativt etc.;0;
;30,35,50,75,76,$;SVTime;typeAttribute;mark time indications;0;;Entity(DateTime)
;30,35,50,75,76,77,$;SVTime;typeAttribute;mark time indications;0;;Entity(DateTime)
;30,75,76,$;SVTimeBegin;typeAttribute;begin of Time expansion;0;;Path(Begin,DateTime)
;30,75,76,$;SVTimeStop;typeAttribute;marker to end Time expansion;0;;Path(End,DateTime)
;30,75,76,77,$;SVTimeStop;typeAttribute;marker to end Time expansion;0;;Path(End,DateTime)
;76,77;InTimespan;typeAttribute;to mark lexreps that are part of a Time span;0;;

;30,35;SVNummodifier;typeAttribute;ungefär, drygt, exakt etc.;0;;
;30;SVModBeforeNum;typeAttribute;assigned by rule to Nummodifier before number;0;;

;1,30,35,40;SVAge;typeAttribute;words that indicate the presence of an age mention;0;;
;1,30,35,77,$;SVAge;typeAttribute;words that indicate the presence of an age mention;0;;

;1,35,$;Measurement;typeAttribute;general attribute for all measurements;0;;Entity(Measurement)
;1,35,$;ValueProperty;typeAttribute;attribute for the Unit property;0;;Entity(Measurement,Value)
;1,35,77,$;Measurement;typeAttribute;general attribute for all measurements;0;;Entity(Measurement)
;1,35,77,$;ValueProperty;typeAttribute;attribute for the Unit property;0;;Entity(Measurement,Value)
;1,35,$;UnitProperty;typeAttribute;attribute for the Unit property;0;;Entity(Measurement,Unit)
;1,$;MeasurementBegin;typeAttribute;added for enabling path expansion;0;;Path(Begin,Measurement)
;1,$;MeasurementStop;typeAttribute;added for enabling path expansion;0;;Path(End,Measurement)
;1,35;SVPostmeas;typeAttribute;speficies a unit, e.g. högre, färre;0;
;1,35;Measindicator;typeAttribute;indicates that the following lexrep is probably a measurement;0;

;40,65,70,75,80;SVPBegin;typeAttribute;start of clause;0;;
;1,77,$;MeasurementBegin;typeAttribute;added for enabling path expansion;0;;Path(Begin,Measurement)
;1,35,77,$;MeasurementStop;typeAttribute;added for enabling path expansion;0;;Path(End,Measurement)
;1,77;InMeasspan;typeAttribute;to mark lexreps that are part of a measurement span;0;
/*;1,35;SVPostmeas;typeAttribute;speficies a unit, e.g. högre, färre;0;
;1,35,77;SVPostmeas;typeAttribute;speficies a unit, e.g. högre, färre;0;
;1,35,77;Measindicator;typeAttribute;indicates that the following lexrep is probably a measurement;0;
;1,30,77;Measindicator2;typeAttribute;indicates that the following lexrep is probably a measurement, not part of value;0;
;1,35,77;Percentage;typeAttribute;procent, %;0;
;1,77;Meascomparative;typeAttribute;större, längre,...;0;

;40,65,70,75,77,80;SVPBegin;typeAttribute;start of clause;0;;
;40,65,70;SVPVerb;typeAttribute;verb;0;;

;30,40,65;SVBracket1;typeAttribute;opening bracket, defined as attribute to avoid interference with punctuation label;0;;
Expand Down
Loading

0 comments on commit fa5ca83

Please sign in to comment.