Terms to Cluster MappingΒΆ

>>> from techminer2.packages.networks.co_occurrence.user import TermsToClustersMapping
>>> mapping = (
...     TermsToClustersMapping()
...     #
...     # FIELD:
...     .with_field("raw_keywords")
...     .having_terms_in_top(20)
...     .having_terms_ordered_by("OCC")
...     .having_term_occurrences_between(None, None)
...     .having_term_citations_between(None, None)
...     .having_terms_in(None)
...     #
...     # COUNTERS:
...     .using_term_counters(True)
...     #
...     # NETWORK:
...     .using_clustering_algorithm_or_dict("louvain")
...     .using_association_index("association")
...     #
...     # DATABASE:
...     .where_root_directory_is("example/")
...     .where_database_is("main")
...     .where_record_years_range_is(None, None)
...     .where_record_citations_range_is(None, None)
...     .where_records_match(None)
...     #
...     .run()
... )
>>> from pprint import pprint
>>> pprint(mapping)
{'BANKING 03:0370': 0,
 'BLOCKCHAIN 03:0881': 1,
 'BUSINESS_MODELS 03:1335': 1,
 'COMMERCE 03:0846': 1,
 'CROWDFUNDING 03:0335': 2,
 'ELECTRONIC_MONEY 03:0305': 0,
 'FINANCE 11:1950': 1,
 'FINANCIAL_INCLUSION 03:0590': 0,
 'FINANCIAL_INSTITUTION 03:0488': 0,
 'FINANCIAL_SERVICE 04:1036': 1,
 'FINANCIAL_SERVICES 05:0746': 0,
 'FINANCIAL_SERVICES_INDUSTRIES 02:0696': 1,
 'FINANCIAL_TECHNOLOGY 03:0461': 2,
 'FINTECH 32:5393': 0,
 'INNOVATION 08:0990': 0,
 'LITERATURE_REVIEW 02:0560': 2,
 'MARKETPLACE_LENDING 03:0317': 0,
 'SURVEYS 03:0484': 0,
 'SUSTAINABILITY 03:0227': 2,
 'SUSTAINABLE_DEVELOPMENT 03:0227': 2}
>>> mapping = (
...     TermsToClustersMapping()
...     #
...     # FIELD:
...     .with_field("raw_keywords")
...     .having_terms_in_top(20)
...     .having_terms_ordered_by("OCC")
...     .having_term_occurrences_between(None, None)
...     .having_term_citations_between(None, None)
...     .having_terms_in(None)
...     #
...     # COUNTERS:
...     .using_term_counters(False)
...     #
...     # NETWORK:
...     .using_clustering_algorithm_or_dict("louvain")
...     .using_association_index("association")
...     #
...     # DATABASE:
...     .where_root_directory_is("example/")
...     .where_database_is("main")
...     .where_record_years_range_is(None, None)
...     .where_record_citations_range_is(None, None)
...     .where_records_match(None)
...     #
...     .run()
... )
>>> from pprint import pprint
>>> pprint(mapping)
{'BANKING': 0,
 'BLOCKCHAIN': 1,
 'BUSINESS_MODELS': 1,
 'COMMERCE': 1,
 'CROWDFUNDING': 2,
 'ELECTRONIC_MONEY': 0,
 'FINANCE': 1,
 'FINANCIAL_INCLUSION': 0,
 'FINANCIAL_INSTITUTION': 0,
 'FINANCIAL_SERVICE': 1,
 'FINANCIAL_SERVICES': 0,
 'FINANCIAL_SERVICES_INDUSTRIES': 1,
 'FINANCIAL_TECHNOLOGY': 2,
 'FINTECH': 0,
 'INNOVATION': 0,
 'LITERATURE_REVIEW': 2,
 'MARKETPLACE_LENDING': 0,
 'SURVEYS': 0,
 'SUSTAINABILITY': 2,
 'SUSTAINABLE_DEVELOPMENT': 2}