Commit ceff1018 authored by jfschaefer's avatar jfschaefer
Browse files

extended gf grammar, added more examples, added generated lexicon for nouns

parent 1cf50e7e
......@@ -4,6 +4,8 @@ abstract FLexicon = MCats ** {
fun
n_FIdentifier : FIdentifier;
m_FIdentifier : FIdentifier;
A_FIdentifier : FIdentifier;
a_FIdentifier : FIdentifier;
one_FNumeral : FNumeral;
......
......@@ -2,6 +2,8 @@ concrete FLexiconEng of FLexicon = MCatsEng ** {
lin
n_FIdentifier = "n";
m_FIdentifier = "m";
A_FIdentifier = "A";
a_FIdentifier = "a";
one_FNumeral = "1";
......
......@@ -9,6 +9,7 @@ abstract NGrammar = MCats, Grammar, Extra, ExtraEngAbs ** {
mobj_such_that : MObj -> Statement -> PosNegPol -> MObj; -- "integer such that ..."
def_descr_mobj : MObj -> DefMObj; -- "cube" -> "the cube"
appo_mobj : MObj -> MathCN -> MObj; -- "an integer $ mi ( n ) $
it_pron_defmobj : DefMObj; -- "it"
exists_statement : MObj -> Statement; -- "integer" -> "there is an integer"
not_exists_statement : MObj -> Statement; -- "integer" -> "there is no integer"
......@@ -18,9 +19,11 @@ abstract NGrammar = MCats, Grammar, Extra, ExtraEngAbs ** {
iff_statementfin : StatementFin -> StatementFin -> StatementFin;
and_statementfin : StatementFin -> StatementFin -> StatementFin;
or_statementfin : StatementFin -> StatementFin -> StatementFin;
def_defmobj_defmobj : DefMObj -> DefMObj -> Statement; -- "the empty set is the set without elements"
def_mobj_mobjprop : MObj -> MObjProp -> Definition; -- "an integer is called prime"
iff_definition : Definition -> StatementFin -> Definition; -- "... is called ... iff ..."
def_appo_is_mobj : MObj -> MathCN -> MObj -> Definition; -- "an alphabet $A$ is a finite set
utter_statement : StatementFin -> Utterance; -- essentially identity
utter_definition : Definition -> Utterance; -- essentially identity
......
......@@ -8,6 +8,7 @@ concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open Syntax
def_descr_mobj obj = mkNP the_Art obj;
mobj_such_that obj restr pol = mkCN obj (mkRS pol (mkRCl restr));
appo_mobj obj mcn = lin CN { s = \\number,case_ => obj.s ! number ! case_ ++ mcn.s ! number ! case_; g = obj.g };
it_pron_defmobj = mkNP it_Pron;
exists_statement obj = mkCl obj | ExistsNP (mkNP aSg_Det obj);
not_exists_statement obj = mkCl (mkNP no_Quant obj) | ExistsNP (mkNP no_Quant obj);
......@@ -23,6 +24,10 @@ concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open Syntax
(PastPartAP (mkVPSlash (mkV2A (mkV "call" "calls" "called" "called" "calling") noPrep) prop)));
-- iff_definition defi condition = lin S { s = "iff" }; -- better solution for this?
iff_definition defi condition = lin S { s = defi.s ++ "iff" ++ condition.s }; -- better solution for this?
def_defmobj_defmobj a b = mkCl a b;
def_appo_is_mobj definiendum representative definiens =
mkS (mkCl (DetCN {- mkNP is for some reason ambiguous -}
aSg_Det (appo_mobj definiendum representative)) definiens);
utter_statement s = mkUtt s;
utter_definition s = mkUtt s;
......
-- natural language lexicon
abstract NLexicon = MCats ** {
abstract NLexicon = MCats, NLexiconMObj ** {
fun
integer_MObj : MObj;
-- integer_MObj : MObj;
-- set_MObj : MObj;
-- alphabet_MObj : MObj;
finite_MObjProp : MObjProp;
empty_MObjProp : MObjProp;
even_MObjProp : MObjProp;
positive_MObjProp : MObjProp;
prime_MObjProp : MObjProp;
......
concrete NLexiconEng of NLexicon = MCatsEng ** open SyntaxEng, ParadigmsEng in {
concrete NLexiconEng of NLexicon = MCatsEng, NLexiconMObjEng ** open SyntaxEng, ParadigmsEng in {
lin
integer_MObj = mkCN (mkN "integer");
-- integer_MObj = mkCN (mkN "integer");
-- set_MObj = mkCN (mkN "set");
-- alphabet_MObj = mkCN (mkN "alphabet");
finite_MObjProp = mkAP (mkA "finite");
empty_MObjProp = mkAP (mkA "empty");
even_MObjProp = mkAP (mkA "even");
positive_MObjProp = mkAP (mkA "positive");
prime_MObjProp = mkAP (mkA "prime");
......
-- Automatically generated, slightly human-redacted (words like "author" have been removed) lexicon for the most common mathematical nouns of a sample of 2 * 10^6 sentences.
-- Some physics papers were included, so a few physical nouns are contained as well.
-- The machine learning algorithm is still under development and more refined and more complete results can be expected.
-- Currently all nouns are of type MObj. This shouldn't be the case, as e.g. optimality does not represent a mathematical object.
abstract NLexiconMObj = MCats ** {
fun
set_MObj : MObj;
function_MObj : MObj;
case_MObj : MObj;
space_MObj : MObj;
form_MObj : MObj;
point_MObj : MObj;
group_MObj : MObj;
result_MObj : MObj;
sequence_MObj : MObj;
operator_MObj : MObj;
map_MObj : MObj;
number_MObj : MObj;
algebra_MObj : MObj;
solution_MObj : MObj;
constant_MObj : MObj;
vector_MObj : MObj;
measure_MObj : MObj;
system_MObj : MObj;
time_MObj : MObj;
matrix_MObj : MObj;
metric_MObj : MObj;
class_MObj : MObj;
product_MObj : MObj;
field_MObj : MObj;
graph_MObj : MObj;
structure_MObj : MObj;
element_MObj : MObj;
polynomial_MObj : MObj;
boundary_MObj : MObj;
subset_MObj : MObj;
probability_MObj : MObj;
manifold_MObj : MObj;
state_MObj : MObj;
family_MObj : MObj;
basis_MObj : MObj;
action_MObj : MObj;
limit_MObj : MObj;
value_MObj : MObj;
representation_MObj : MObj;
way_MObj : MObj;
vertex_MObj : MObj;
process_MObj : MObj;
norm_MObj : MObj;
integer_MObj : MObj;
model_MObj : MObj;
existence_MObj : MObj;
sum_MObj : MObj;
term_MObj : MObj;
relation_MObj : MObj;
integral_MObj : MObj;
sense_MObj : MObj;
curvature_MObj : MObj;
bundle_MObj : MObj;
distribution_MObj : MObj;
ideal_MObj : MObj;
curve_MObj : MObj;
pair_MObj : MObj;
domain_MObj : MObj;
subgroup_MObj : MObj;
identity_MObj : MObj;
surface_MObj : MObj;
edge_MObj : MObj;
construction_MObj : MObj;
line_MObj : MObj;
notation_MObj : MObj;
algorithm_MObj : MObj;
component_MObj : MObj;
extension_MObj : MObj;
decomposition_MObj : MObj;
subspace_MObj : MObj;
isomorphism_MObj : MObj;
method_MObj : MObj;
index_MObj : MObj;
statement_MObj : MObj;
choice_MObj : MObj;
projection_MObj : MObj;
mapping_MObj : MObj;
variable_MObj : MObj;
distance_MObj : MObj;
interval_MObj : MObj;
setting_MObj : MObj;
parameter_MObj : MObj;
series_MObj : MObj;
weight_MObj : MObj;
path_MObj : MObj;
neighborhood_MObj : MObj;
density_MObj : MObj;
equivalence_MObj : MObj;
flow_MObj : MObj;
image_MObj : MObj;
energy_MObj : MObj;
factor_MObj : MObj;
contradiction_MObj : MObj;
kernel_MObj : MObj;
ring_MObj : MObj;
tensor_MObj : MObj;
connection_MObj : MObj;
geodesic_MObj : MObj;
consequence_MObj : MObj;
restriction_MObj : MObj;
lattice_MObj : MObj;
inverse_MObj : MObj;
intersection_MObj : MObj;
partition_MObj : MObj;
union_MObj : MObj;
plane_MObj : MObj;
ball_MObj : MObj;
expression_MObj : MObj;
orbit_MObj : MObj;
tree_MObj : MObj;
root_MObj : MObj;
derivative_MObj : MObj;
hamiltonian_MObj : MObj;
entropy_MObj : MObj;
approximation_MObj : MObj;
semigroup_MObj : MObj;
power_MObj : MObj;
change_MObj : MObj;
quotient_MObj : MObj;
embedding_MObj : MObj;
base_MObj : MObj;
chain_MObj : MObj;
transformation_MObj : MObj;
cone_MObj : MObj;
homomorphism_MObj : MObj;
difference_MObj : MObj;
expansion_MObj : MObj;
symmetry_MObj : MObj;
closure_MObj : MObj;
eigenvalue_MObj : MObj;
potential_MObj : MObj;
direction_MObj : MObj;
automorphism_MObj : MObj;
spectrum_MObj : MObj;
variety_MObj : MObj;
volume_MObj : MObj;
regularity_MObj : MObj;
computation_MObj : MObj;
rate_MObj : MObj;
context_MObj : MObj;
collection_MObj : MObj;
multiplication_MObj : MObj;
minimum_MObj : MObj;
word_MObj : MObj;
sphere_MObj : MObj;
error_MObj : MObj;
block_MObj : MObj;
permutation_MObj : MObj;
situation_MObj : MObj;
trace_MObj : MObj;
cohomology_MObj : MObj;
range_MObj : MObj;
morphism_MObj : MObj;
position_MObj : MObj;
stability_MObj : MObj;
category_MObj : MObj;
cycle_MObj : MObj;
torus_MObj : MObj;
subsequence_MObj : MObj;
application_MObj : MObj;
coefficient_MObj : MObj;
origin_MObj : MObj;
operation_MObj : MObj;
column_MObj : MObj;
interior_MObj : MObj;
mass_MObj : MObj;
subalgebra_MObj : MObj;
inclusion_MObj : MObj;
covering_MObj : MObj;
frame_MObj : MObj;
reduction_MObj : MObj;
description_MObj : MObj;
strategy_MObj : MObj;
game_MObj : MObj;
circle_MObj : MObj;
arc_MObj : MObj;
discussion_MObj : MObj;
triple_MObj : MObj;
complexity_MObj : MObj;
evolution_MObj : MObj;
diagram_MObj : MObj;
composition_MObj : MObj;
generalization_MObj : MObj;
symbol_MObj : MObj;
fiber_MObj : MObj;
observation_MObj : MObj;
role_MObj : MObj;
generator_MObj : MObj;
center_MObj : MObj;
growth_MObj : MObj;
isometry_MObj : MObj;
complement_MObj : MObj;
combination_MObj : MObj;
triangle_MObj : MObj;
variation_MObj : MObj;
node_MObj : MObj;
divisor_MObj : MObj;
input_MObj : MObj;
scale_MObj : MObj;
equilibrium_MObj : MObj;
region_MObj : MObj;
character_MObj : MObj;
characterization_MObj : MObj;
moment_MObj : MObj;
rest_MObj : MObj;
translation_MObj : MObj;
sign_MObj : MObj;
segment_MObj : MObj;
disk_MObj : MObj;
link_MObj : MObj;
framework_MObj : MObj;
concept_MObj : MObj;
bracket_MObj : MObj;
classification_MObj : MObj;
constraint_MObj : MObj;
kind_MObj : MObj;
expectation_MObj : MObj;
splitting_MObj : MObj;
exponent_MObj : MObj;
cocycle_MObj : MObj;
area_MObj : MObj;
homology_MObj : MObj;
martingale_MObj : MObj;
gradient_MObj : MObj;
period_MObj : MObj;
submanifold_MObj : MObj;
configuration_MObj : MObj;
comparison_MObj : MObj;
diffeomorphism_MObj : MObj;
loop_MObj : MObj;
output_MObj : MObj;
cell_MObj : MObj;
homeomorphism_MObj : MObj;
decay_MObj : MObj;
average_MObj : MObj;
shift_MObj : MObj;
angle_MObj : MObj;
contraction_MObj : MObj;
object_MObj : MObj;
list_MObj : MObj;
duality_MObj : MObj;
face_MObj : MObj;
quantity_MObj : MObj;
compactness_MObj : MObj;
goal_MObj : MObj;
invariance_MObj : MObj;
cost_MObj : MObj;
ordering_MObj : MObj;
singularity_MObj : MObj;
laplacian_MObj : MObj;
network_MObj : MObj;
deformation_MObj : MObj;
noise_MObj : MObj;
measurement_MObj : MObj;
foliation_MObj : MObj;
neighbourhood_MObj : MObj;
derivation_MObj : MObj;
reference_MObj : MObj;
hypersurface_MObj : MObj;
walk_MObj : MObj;
aim_MObj : MObj;
converse_MObj : MObj;
net_MObj : MObj;
lift_MObj : MObj;
coloring_MObj : MObj;
orientation_MObj : MObj;
determinant_MObj : MObj;
gap_MObj : MObj;
language_MObj : MObj;
leaf_MObj : MObj;
bijection_MObj : MObj;
event_MObj : MObj;
ratio_MObj : MObj;
dependence_MObj : MObj;
polytope_MObj : MObj;
copy_MObj : MObj;
reflection_MObj : MObj;
interpretation_MObj : MObj;
filtration_MObj : MObj;
knot_MObj : MObj;
orbifold_MObj : MObj;
resolution_MObj : MObj;
height_MObj : MObj;
effect_MObj : MObj;
factorization_MObj : MObj;
sheaf_MObj : MObj;
attractor_MObj : MObj;
particle_MObj : MObj;
branch_MObj : MObj;
bit_MObj : MObj;
protocol_MObj : MObj;
crossing_MObj : MObj;
source_MObj : MObj;
string_MObj : MObj;
perturbation_MObj : MObj;
search_MObj : MObj;
logic_MObj : MObj;
sample_MObj : MObj;
frequency_MObj : MObj;
supremum_MObj : MObj;
circuit_MObj : MObj;
functor_MObj : MObj;
velocity_MObj : MObj;
iteration_MObj : MObj;
rotation_MObj : MObj;
cube_MObj : MObj;
sequel_MObj : MObj;
program_MObj : MObj;
disc_MObj : MObj;
interaction_MObj : MObj;
immersion_MObj : MObj;
signature_MObj : MObj;
hyperplane_MObj : MObj;
grading_MObj : MObj;
body_MObj : MObj;
speed_MObj : MObj;
independence_MObj : MObj;
hull_MObj : MObj;
price_MObj : MObj;
valuation_MObj : MObj;
divergence_MObj : MObj;
box_MObj : MObj;
monotonicity_MObj : MObj;
endomorphism_MObj : MObj;
subgraph_MObj : MObj;
contribution_MObj : MObj;
identification_MObj : MObj;
soliton_MObj : MObj;
momentum_MObj : MObj;
terminology_MObj : MObj;
spacetime_MObj : MObj;
simplex_MObj : MObj;
requirement_MObj : MObj;
convolution_MObj : MObj;
core_MObj : MObj;
pole_MObj : MObj;
design_MObj : MObj;
cluster_MObj : MObj;
variance_MObj : MObj;
fraction_MObj : MObj;
channel_MObj : MObj;
cardinal_MObj : MObj;
stabilizer_MObj : MObj;
relationship_MObj : MObj;
filter_MObj : MObj;
axiom_MObj : MObj;
resolvent_MObj : MObj;
boundedness_MObj : MObj;
pattern_MObj : MObj;
cylinder_MObj : MObj;
positivity_MObj : MObj;
chart_MObj : MObj;
locus_MObj : MObj;
memory_MObj : MObj;
coupling_MObj : MObj;
jump_MObj : MObj;
summand_MObj : MObj;
evaluation_MObj : MObj;
shape_MObj : MObj;
remainder_MObj : MObj;
normalization_MObj : MObj;
parity_MObj : MObj;
behaviour_MObj : MObj;
communication_MObj : MObj;
machine_MObj : MObj;
tiling_MObj : MObj;
slice_MObj : MObj;
agent_MObj : MObj;
braid_MObj : MObj;
clique_MObj : MObj;
contrary_MObj : MObj;
hierarchy_MObj : MObj;
representative_MObj : MObj;
integrability_MObj : MObj;
annulus_MObj : MObj;
modification_MObj : MObj;
letter_MObj : MObj;
query_MObj : MObj;
implication_MObj : MObj;
observable_MObj : MObj;
trajectory_MObj : MObj;
difficulty_MObj : MObj;
substitution_MObj : MObj;
message_MObj : MObj;
localization_MObj : MObj;
poset_MObj : MObj;
dilation_MObj : MObj;
matter_MObj : MObj;
ordinal_MObj : MObj;
book_MObj : MObj;
fibration_MObj : MObj;
flag_MObj : MObj;
presence_MObj : MObj;
summation_MObj : MObj;
front_MObj : MObj;
pressure_MObj : MObj;
endpoint_MObj : MObj;
infimum_MObj : MObj;
assignment_MObj : MObj;
ultrafilter_MObj : MObj;
ray_MObj : MObj;
pairing_MObj : MObj;
groupoid_MObj : MObj;
smoothness_MObj : MObj;
macaulay_MObj : MObj;
idempotent_MObj : MObj;
estimation_MObj : MObj;
continuation_MObj : MObj;
variant_MObj : MObj;
background_MObj : MObj;
amount_MObj : MObj;
issue_MObj : MObj;
former_MObj : MObj;
minimizer_MObj : MObj;
parametrization_MObj : MObj;
commutator_MObj : MObj;
outcome_MObj : MObj;
utility_MObj : MObj;
multiplier_MObj : MObj;
grid_MObj : MObj;
alphabet_MObj : MObj;
fluid_MObj : MObj;
cusp_MObj : MObj;
occurrence_MObj : MObj;
objective_MObj : MObj;
eigenvector_MObj : MObj;
atom_MObj : MObj;
pde_MObj : MObj;
profile_MObj : MObj;
eigenfunction_MObj : MObj;
content_MObj : MObj;
coset_MObj : MObj;
bottom_MObj : MObj;
encoding_MObj : MObj;
realization_MObj : MObj;
matroid_MObj : MObj;
monoid_MObj : MObj;
congruence_MObj : MObj;
task_MObj : MObj;
threshold_MObj : MObj;
selection_MObj : MObj;
array_MObj : MObj;
tail_MObj : MObj;
market_MObj : MObj;
charge_MObj : MObj;
name_MObj : MObj;
radical_MObj : MObj;
monodromy_MObj : MObj;
temperature_MObj : MObj;
jacobian_MObj : MObj;
development_MObj : MObj;
candidate_MObj : MObj;
quandle_MObj : MObj;
slope_MObj : MObj;
site_MObj : MObj;
phenomenon_MObj : MObj;
payoff_MObj : MObj;
importance_MObj : MObj;
posedness_MObj : MObj;
analog_MObj : MObj;
rectangle_MObj : MObj;
picture_MObj : MObj;
population_MObj : MObj;
orthogonality_MObj : MObj;
lifting_MObj : MObj;
motivation_MObj : MObj;
compactification_MObj : MObj;
feature_MObj : MObj;
building_MObj : MObj;
environment_MObj : MObj;
compatibility_MObj : MObj;
minimality_MObj : MObj;
signal_MObj : MObj;
denominator_MObj : MObj;
piece_MObj : MObj;
fibre_MObj : MObj;
triangulation_MObj : MObj;
neighbor_MObj : MObj;
estimator_MObj : MObj;
twist_MObj : MObj;
inversion_MObj : MObj;
polygon_MObj : MObj;
survey_MObj : MObj;
quantization_MObj : MObj;
member_MObj : MObj;
similarity_MObj : MObj;
separation_MObj : MObj;
hypergraph_MObj : MObj;
recursion_MObj : MObj;
ensemble_MObj : MObj;
submersion_MObj : MObj;
uncertainty_MObj : MObj;
witness_MObj : MObj;
flux_MObj : MObj;
drift_MObj : MObj;
ode_MObj : MObj;
validity_MObj : MObj;
couple_MObj : MObj;
arrow_MObj : MObj;
finiteness_MObj : MObj;
location_MObj : MObj;
subvariety_MObj : MObj;
treatment_MObj : MObj;
oracle_MObj : MObj;
verifier_MObj : MObj;
continuum_MObj : MObj;
hessian_MObj : MObj;
simulation_MObj : MObj;
material_MObj : MObj;
topic_MObj : MObj;
division_MObj : MObj;
recovery_MObj : MObj;
isotopy_MObj : MObj;
rescaling_MObj : MObj;
band_MObj : MObj;
strip_MObj : MObj;
germ_MObj : MObj;
facet_MObj : MObj;
integrand_MObj : MObj;
pullback_MObj : MObj;
subbundle_MObj : MObj;
regularization_MObj : MObj;
superalgebra_MObj : MObj;
concentration_MObj : MObj;
counterexample_MObj : MObj;
exchange_MObj : MObj;
propagation_MObj : MObj;
envelope_MObj : MObj;
deviation_MObj : MObj;
tile_MObj : MObj;
performance_MObj : MObj;
history_MObj : MObj;
surgery_MObj : MObj;
spirit_MObj : MObj;
wedge_MObj : MObj;
logarithm_MObj : MObj;
verification_MObj : MObj;
counterpart_MObj : MObj;
rigidity_MObj : MObj;
singleton_MObj : MObj;
injectivity_MObj : MObj;
stratum_MObj : MObj;
sort_MObj : MObj;
reconstruction_MObj : MObj;
centre_MObj : MObj;
bifurcation_MObj : MObj;
horizon_MObj : MObj;
asset_MObj : MObj;
projector_MObj : MObj;
hole_MObj : MObj;
superposition_MObj : MObj;
corner_MObj : MObj;
distortion_MObj : MObj;
lack_MObj : MObj;
discriminant_MObj : MObj;
improvement_MObj : MObj;
gain_MObj : MObj;
policy_MObj : MObj;