{% set version = '0.8.6' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-udpipe
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/udpipe_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/udpipe/udpipe_{{ version }}.tar.gz
  sha256: 73e7571f8760ecda95a42fa961dc6f0153b3277c7eca0c84363318da974d1dcb

build:
  merge_build_host: True  # [win]
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: knitr, rmarkdown, topicmodels, lattice, parallel
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]

  host:
    - r-base
    - r-matrix
    - r-rcpp >=0.11.5
    - r-data.table >=1.9.6

  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rcpp >=0.11.5
    - r-data.table >=1.9.6

test:
  commands:
    - $R -e "library('udpipe')"           # [not win]
    - "\"%R%\" -e \"library('udpipe')\""  # [win]

about:
  home: https://bnosac.github.io/udpipe/en/index.html, https://github.com/bnosac/udpipe

  license: MPL-2.0
  summary: 'This natural language processing toolkit provides language-agnostic ''tokenization'',
    ''parts of speech tagging'', ''lemmatization'' and ''dependency parsing'' of raw
    text. Next to text parsing, the package also allows you to train annotation models
    based on data of ''treebanks'' in ''CoNLL-U'' format as provided at <https://universaldependencies.org/format.html>.
    The techniques are explained in detail in the paper: ''Tokenizing, POS Tagging,
    Lemmatizing and Parsing UD 2.0 with UDPipe'', available at <doi:10.18653/v1/K17-3009>.
    The toolkit also contains functionalities for commonly used data manipulations on
    texts which are enriched with the output of the parser. Namely functionalities and
    algorithms for collocations, token co-occurrence, document term matrix handling,
    term frequency inverse document frequency calculations, information retrieval metrics
    (Okapi BM25), handling of multi-word expressions, keyword detection (Rapid Automatic
    Keyword Extraction, noun phrase extraction, syntactical patterns) sentiment scoring
    and semantic similarity analysis.'

  license_family: OTHER
  license_file: LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
