Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
H
hal
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 3
    • Issues 3
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • crawlers
  • hal
  • Merge Requests
  • !16

Open
Opened Aug 10, 2023 by Fabien Maniere@fmaniere
  • Report abuse
Report abuse

WIP: DON'T MERGE YET - Slight lang improvement

Related issue/comment: gargantext/haskell-gargantext#244 (comment 8081)

Hello @cgenie, please could you help please?

Objective of the branch:

  • help to get the same results from API requests as the results from the online HAL search (http)
  • Currently, title_s is not localized (same for FR /EN), but search results are more accurate if title_s is replaced par *_title_s, just as *_abstract_s has been recently localized (fr_abstract_s, en_abstract_s).

Concrete example, a wanted API request:

  • FR: https://api.archives-ouvertes.fr/search/?q=text:(arbitrary%20monadic%20effects)&fl=docid,fr_title_s,fr_abstract_s&wt=json
  • EN: https://api.archives-ouvertes.fr/search/?q=text:(arbitrary%20monadic%20effects)&fl=docid,en_title_s,en_abstract_s&wt=json

PLEASE HELP - what I did/tried:

  • on this hal repo, I added langTitleS with the same behaviour as langAbstractS but I get this blocking error on compilation and can't find what to do:
src/HAL/Doc/Corpus.hs:35:37: error:
    • Ambiguous type variable ‘a0’ arising from a use of ‘.:’
      prevents the constraint ‘(FromJSON a0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘a0’ should be.
      These potential instances exist:
        instance FromJSON DotNetTime
          -- Defined in ‘aeson-1.5.6.0:Data.Aeson.Types.FromJSON’
        instance FromJSON Value
          -- Defined in ‘aeson-1.5.6.0:Data.Aeson.Types.FromJSON’
        instance (FromJSON a, FromJSON b) => FromJSON (Either a b)
          -- Defined in ‘aeson-1.5.6.0:Data.Aeson.Types.FromJSON’
        ...plus 51 others
        ...plus 52 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the first argument of ‘(<|>)’, namely ‘o .: "en_title_s"’
      In a stmt of a 'do' block:
        _corpus_title <- o .: "en_title_s" <|> return []
      In the expression:
        do _corpus_docid <- o .: "docid"
           _corpus_title <- o .: "en_title_s" <|> return []
           _corpus_abstract <- o .: "en_abstract_s" <|> return []
           _corpus_date <- o .:? "submittedDate_s"
           ....
   |
35 |     _corpus_title                <- o .: "en_title_s" <|> return []
   |                                     ^^^^^^^^^^^^^^^^^
Error: cabal: Failed to build crawlerHAL-0.1.0.0 (which is required by
exe:gargantext-server from gargantext-0.0.6.9.9.7.5.1). See the build log
above for details.

Thank you in advance

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b slight-lang-improvement origin/slight-lang-improvement

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff slight-lang-improvement

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 2
  • Commits 11
  • Changes 4
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/crawlers/hal!16