OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Interpret percentages:

Interpreter["ComputedPercentFraction"]["5 percent"]

Interpret percentages derived by computation:

Interpreter["ComputedPercentFraction"]["unemployment rate of Greece"]

If no unit is provided, convert the number to a percentage:

Interpreter["ComputedPercentFraction"]["3/17"]

Interpreter["ComputedPercentFraction"]["1"]

Interpreter["ComputedPercentFraction"]["Germany GDP / Europe "]

Cf. (StringTypeLink["ComputedPercent", paclet:ref/interpreter/ComputedPercent]), which simply infers a percent unit:

Interpreter["ComputedPercent"]["1+2"]

And (StringTypeLink["ComputedHeuristicPercent", paclet:ref/interpreter/ComputedHeuristicPercent]), which decides what to do based on heuristics:

Interpreter["ComputedHeuristicPercent"]["Germany GDP / Europe "]

Interpreter["ComputedHeuristicPercent"]["1+2"]

Interpret quantities or numbers as fractions of the given baseline:

Interpreter[Restricted["ComputedPercentFraction",(Entity["United States", Entity["Country","UnitedStates"], "Entity[\"Country\", \"UnitedStates\"]", "country"])[(EntityProperty["population", EntityProperty["Country","Population",{}], "EntityProperty[\"Country\", \"Population\", {}]"])]]]["Illinois population"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Interpreter, paclet:ref/Interpreter])  ▪  (RefLink[SemanticImport, paclet:ref/SemanticImport])  ▪  (RefLink[Restricted, paclet:ref/Restricted])  ▪  (RefLink[Failure, paclet:ref/Failure])}, {Related Interpreter Types:  (RefLink[PercentFraction, paclet:ref/interpreter/PercentFraction])  ▪  (RefLink[Quantity, paclet:ref/interpreter/Quantity])  ▪  (RefLink[Percent, paclet:ref/interpreter/Percent])  ▪  (RefLink[HeuristicPercent, paclet:ref/interpreter/HeuristicPercent])  ▪  (RefLink[StructuredQuantity, paclet:ref/interpreter/StructuredQuantity])  ▪  (RefLink[ComputedQuantity, paclet:ref/interpreter/ComputedQuantity])  ▪  (RefLink[ComputedPercent, paclet:ref/interpreter/ComputedPercent])  ▪  (RefLink[ComputedHeuristicPercent, paclet:ref/interpreter/ComputedHeuristicPercent])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}})}})